Index of the validators module
-
m
formencode.validators
...
- Validator/Converters for use with FormEncode.
-
C
Regex
...
- Invalid if the value doesn't match the regular expression regex.
-
C
OneOf
...
- Tests that the value is one of the members of a given list.
-
C
TimeConverter
...
- Converts times in the format HH:MM:SSampm to (h, m, s).
Seconds are optional.
-
C
PlainText
...
- Test that the field contains only letters, numbers, underscore,
and the hyphen. Subclasses Regex.
-
C
ConfirmType
...
- Confirms that the input/output is of the proper type.
-
C
Bool
...
- Always Valid, returns True or False based on the value and the
existance of the value.
-
C
DateValidator
...
- Validates that a date is within the given range. Be sure to call
DateConverter first if you aren't expecting mxDateTime input.
-
C
Email
...
- Validate an email address.
-
C
Empty
...
- Invalid unless the value is empty. Use cleverly, if at all.
-
C
FieldStorageUploadConverter
...
- Converts a cgi.FieldStorage instance to
a value that FormEncode can use for file
uploads.
-
C
String
...
- Converts things to string, but treats empty things as the empty
string.
-
C
CreditCardSecurityCode
...
- Checks that credit card security code has the correct number
of digits for the given credit card type.
-
C
DictConverter
...
- Converts values based on a dictionary which has values as keys for
the resultant values.
-
C
StripField
...
- Take a field from a dictionary, removing the key from the
dictionary.
-
C
FieldsMatch
...
- Tests that the given fields match, i.e., are identical. Useful
for password+confirmation fields. Pass the list of field names in
as field_names.
-
C
CreditCardValidator
...
- Checks that credit card numbers are valid (if not real).
-
C
Number
...
- Convert a value to a float or integer. Tries to convert it to
an integer if no information is lost.
-
C
FormValidator
...
- A FormValidator is something that can be chained with a
Schema. Unlike normal chaining the FormValidator can
validate forms that aren't entirely valid.
-
C
RequireIfMissing
...
- Messages
-
C
DateConverter
...
- Validates and converts a string date, like mm/yy, dd/mm/yy,
dd-mm-yy, etc. Using month_style you can support
'mm/dd/yyyy' or 'dd/mm/yyyy'. Only these two general
styles are supported.
-
C
FileUploadKeeper
...
- Takes two inputs (a dictionary with keys static and
upload) and converts them into one value on the Python side (a
dictionary with filename and content keys). The upload
takes priority over the static value. The filename may be None if
it can't be discovered.
-
C
IPhoneNumberValidator
...
- Validates, and converts phone numbers to +##-###-#######.
Adapted from RFC 3966
-
C
URL
...
- Validate a URL, either http://... or https://. If check_exists
is true, then we'll actually make a request for the page.
-
C
StringBool
...
- Converts a string to a boolean.
-
C
CreditCardExpires
...
- Checks that credit card expiration date is valid relative to
the current date.
-
C
IndexListConverter
...
- Converts a index (which may be a string like '2') to the value in
the given list.
-
C
PhoneNumber
...
- Validates, and converts to ###-###-####, optionally with extension
(as ext.##...). Only support US phone numbers. See
InternationalPhoneNumber for support for that kind of phone number.
-
C
Wrapper
...
- Used to convert functions to validator/converters.
-
C
PostalCode
...
- US Postal codes (aka Zip Codes).
-
C
CIDR
...
- Formencode validator to check whether a string is in correct CIDR
notation (IP address, or IP address plus /mask)
-
C
StateProvince
...
- Valid state or province code (two-letter).
-
C
MACAddress
...
- Formencode validator to check whether a string is a correct hardware
(MAC) address.
-
C
Set
...
- This is for when you think you may return multiple values for a
certain field.
-
C
Constant
...
- This converter converts everything to the same thing.
-
C
NotEmpty
...
- Invalid if value is empty (empty string, empty list, etc).
-
C
Int
...
- Convert a value to an integer.
-
C
SignedString
...
- Encodes a string into a signed string, and base64 encodes both the
signature string and a random nonce.
-
C
MinLength
...
- Invalid if the value is shorter than minlength. Uses len(),
so it can work for strings, lists, or anything with length.
-
C
MaxLength
...
- Invalid if the value is longer than maxLength. Uses len(),
so it can work for strings, lists, or anything with length.
-
C
UnicodeString
...
- Converts things to unicode string, this is a specialization of
the String class.