Standard Validators of Zend Framework

This class validates $value is alphabet or number.
Following is about the constructer.

Following is about the error messages.

Error Message Key Initial Error Message
notAlnum ‘%value%’ has not only alphabetic and digit characters
stringEmpty ‘%value%’ is an empty string
This class validates $value is alphabet.
Following is about the constructer.

Following is about the error messages.

Error Message Key Initial Error Message
notAlpha ‘%value%’ has not only alphabetic characters
stringEmpty ‘%value%’ is an empty string
This class validates $values is barcode format.
Following is about the constructer.
(‘upc’ or ‘ean13’ can be used as the parameter $barcodeType)

Following is about the error messages(UPC-A).

Error Message Key Initial Error Message
invalid ‘%value%’ is an invalid UPC-A barcode
invalidLength ‘%value%’ is an invalid UPC-A barcode

Following is about the error messages(EAN-13).

Error Message Key Initial Error Message
invalid ‘%value%’ is an invalid EAN-13 barcode
invalidLength ‘%value%’ should be 13 characters
This class validates $value is between $min and $max.
Following is about the constructer.

Following is about the error messages.

Error Message Key Initial Error Message
notBetween ‘%value%’ is not between ‘%min%’ and ‘%max%’, inclusively
notBetweenStrict ‘%value%’ is not strictly between ‘%min%’ and ‘%max%’
This class validates $value follows Luhn algorithm (mod-10 checksum) credit card numbers.
This class has no constructer.
Following is about the error messages.

Error Message Key Initial Error Message
ccnumLength ‘%value%’ must contain between 13 and 19 digits
ccnumChecksum Luhn algorithm (mod-10 checksum) failed on ‘%value%’
This class validates $value is a valid date of the specified format(default YYYY-MM-DD).
Following is about the constructer.

Following is about the error messages.

Error Message Key Initial Error Message
dateNotYYYY-MM-DD ‘%value%’ is not of the format YYYY-MM-DD
dateInvalid ‘%value%’ does not appear to be a valid date
dateFalseFormat ‘%value%’ does not fit given date format
This class validates $value only contains digit characters.
This class has no constructer.
Following is about the error messages.

Error Message Key Initial Error Message
notDigits ‘%value%’ contains not only digit characters
stringEmpty ‘%value%’ is an empty string
This class validates $value is a valid email address.
Following is about the constructer.

Following is about the error messages.

Error Message Key Initial Error Message
emailAddressInvalid ‘%value%’ is not a valid email address in the basic format local-part@hostname
emailAddressInvalidHostname ‘%hostname%’ is not a valid hostname for email address ‘%value%’
emailAddressInvalidMxRecord ‘%hostname%’ does not appear to have a valid MX record for the email address ‘%value%’
emailAddressDotAtom ‘%localPart%’ not matched against dot-atom format
emailAddressQuotedString ‘%localPart%’ not matched against quoted-string format
emailAddressInvalidLocalPart ‘%localPart%’ is not a valid local part for email address ‘%value%’
This class validates $value is a floating-point value.
This class has no constructer.
Following is about the error messages.

Error Message Key Initial Error Message
notFloat ‘%value%’ does not appear to be a float
This class validates $value is greater than $min.
Following is about the constructer.

Following is about the error messages.

Error Message Key Initial Error Message
notGreaterThan ‘%value%’ is not greater than ‘%min%’
This class validates $value contains only hexadecimal digit characters.
This class has no constructer.
Following is about the error messages.

Error Message Key Initial Error Message
notHex ‘%value%’ has not only hexadecimal digit characters
This class validates $value is a valid host name.
Following is about the constructer.

Following is about the error messages.

Error Message Key Initial Error Message
hostnameIpAddressNotAllowed ‘%value%’ appears to be an IP address, but IP addresses are not allowed
hostnameUnknownTld ‘%value%’ appears to be a DNS hostname but cannot match TLD against known list
hostnameDashCharacter ‘%value%’ appears to be a DNS hostname but contains a dash (-) in an invalid position
hostnameInvalidHostnameSchema ‘%value%’ appears to be a DNS hostname but cannot match against hostname schema for TLD ‘%tld%’
hostnameUndecipherableTld ‘%value%’ appears to be a DNS hostname but cannot extract TLD part
hostnameInvalidHostname ‘%value%’ does not match the expected structure for a DNS hostname
hostnameInvalidLocalName ‘%value%’ does not appear to be a valid local network name
hostnameLocalNameNotAllowed ‘%value%’ appears to be a local network name but local network names are not allowed
This class validates $value is same as $token.
Following is about the constructer.

Following is about the error messages.

Error Message Key Initial Error Message
notSame Tokens do not match
missingToken No token was provided to match against
This class validates $value is contained in array $haystack.
Following is about the constructer.

Following is about the error messages.

Error Message Key Initial Error Message
notInArray ‘%value%’ was not found in the haystack
This class validates $value is a valid integer.
This class has no constructer.
Following is about the error messages.

Error Message Key Initial Error Message
notInt ‘%value%’ does not appear to be an integer
This class validates $value is a valid ip address.
This class has no constructer.
Following is about the error messages.

Error Message Key Initial Error Message
notIpAddress ‘%value%’ does not appear to be a valid IP address
This class validates $value is less than $max.
Following is about the constructer.

Following is about the error messages.

Error Message Key Initial Error Message
notLessThan ‘%value%’ is not less than ‘%max%’
This class validates $value is not empty.
This class has no constructer.
Following is about the error messages.

Error Message Key Initial Error Message
isEmpty Value is empty, but a non-empty value is required
This class validates $value matches against a regular expression pattern.
Following is about the constructer.

Following is about the error messages.

Error Message Key Initial Error Message
regexNotMatch ‘%value%’ does not match against pattern ‘%pattern%’
This class validates the string length of $value is between $min and $max.
Following is about the constructer.

Following is about the error messages.

Error Message Key Initial Error Message
stringLengthTooShort ‘%value%’ is less than %min% characters long
stringLengthTooLong ‘%value%’ is greater than %max% characters long
I have not check it… You can download English and Japanese files from here.

Leave a Reply

Your email address will not be published. Required fields are marked *