respect-validation/docs/PostalCode.md
Henrique Moody 66027b85a5 Documentation improvements
- Add a space after comments with `//`;
- Add missing "See also" sections in some files
2015-10-19 22:55:05 -02:00

485 B

PostalCode

  • v::postalCode(string $countryCode)

Validates a postal code according to the given country code.

v::numeric()->postalCode('BR')->validate('02179000'); // true
v::numeric()->postalCode('BR')->validate('02179-000'); // true
v::numeric()->postalCode('US')->validate('02179-000'); // false

Message template for this validator includes {{countryCode}}.

Extracted from GeoNames.


See also: