google.appengine.api.validation.AsValidator

Wrap various types as instances of a validator.

Used to allow shorthand for common validator types. It converts the following types to the following Validators:

  • strings -> Regex
  • type -> Type
  • collection -> Options
  • Validator -> Itself

validator Object to wrap in a validator.

Validator instance that wraps the given value.

AttributeDefinitionError If validator is not one of the above described types.