Module FormValidator::Constraints |
|
Methods |
Public Instance methods |
match_email(email) |
Sloppy matches a valid email address.
match_state_or_province(value) |
Matches a US state or Canadian province.
match_state(state) |
Matches a US state.
match_province(prov) |
Matches a Canadian province.
match_zip_or_postcode(code) |
Matches a Canadian postal code or US zipcode.
match_postcode(code) |
Matches a Canadian postal code.
match_zip(code) |
Matches a US zipcode.
match_phone(number) |
Matches a generic phone number.
match_american_phone(number) |
Matches a standard american phone number.
match_cc_number(card, card_type) |
The number is checked only for plausibility, it checks if the number could be valid for a type of card by checking the checksum and looking at the number of digits and the number of digits of the number..
match_cc_exp(val) |
This checks if the input is in the format MM/YY or MM/YYYY and if the MM part is a valid month (1-12) and if that date is not in the past.
match_cc_type(val) |
This checks to see if the credit card type begins with a M, V, A, or D.
match_ip_address(val) |
This matches a valid IP address(version 4).