Zend Framework comes with a standard set of validation classes. But if you are like me I always forget what is available. The documentation has not easy to read list of these classes; it is necessary to scroll through the page and then identify these.
So I wanted to create a simple list of these, the full documentation can be found here: Zend Validate Set
- Alnum – only alphabetic and digit characters
- Alpha – only alphabetic characters
- Barcode
- Between – $value is between the minimum and maximum boundary values
- Callback
- CreditCard
- Ccnum – depreciated in favour of the CreditCard validator
- Date – is a valid date of the format ‘YYYY-MM-DD’
- Db_RecordExists
- Db_NoRecordExists
- Digits – only contains digit characters
- EmailAddress
- Float – floating-point value
- GreaterThan
- Hex
- Hostname
- Iban – a valid IBAN (International Bank Account Number)
- Identical – a given value is identical with an set haystack
- InArray
- Int – a valid integer
- Ip – a valid IP address
- Isbn – validate an ISBN-10 or ISBN-13 value
- LessThan
- NotEmpty
- PostCode
- Regex
- Sitemap Validators
- StringLength
Comments
Leave a comment Trackback