2017 © Pedro Peláez
 

library validation-locale

A set of Respect\Validation rules to work with localization

image

respect/validation-locale

A set of Respect\Validation rules to work with localization

  • Friday, June 19, 2015
  • by henriquemoody
  • Repository
  • 4 Watchers
  • 12 Stars
  • 764 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 5 % Grown

The README.md

Respect\ValidationLocale

A set of Respect\Validation rules to work with localization., (*1)

Country

  • v::country()
  • v::country(string $set)

Validates country codes according to ISO 3166-1., (*2)

v::country()->validate('BR'); //true

By default we choose ISO 3166-1 alpha-2 but you can use ISO 3166-1 alpha-3 and ISO 3166-1 numeric as well., (*3)

v::country('alpha-2')->validate('US'); //true
v::country('alpha-3')->validate('USA'); //true
v::country('numeric')->validate('840'); //true

This rule is case sensitive., (*4)

All data of this rule was extrated from GeoNames which is licensed under a Creative Commons Attribution 3.0 License., (*5)

CountrySubdivision

  • v::countrySubdivision(string $entry)

Validates country codes according to ISO 3166-2., (*6)

The $entry must be a country in ISO 3166-1 alpha-2 format., (*7)

v::countrySubdivision('BR')->validate('SP'); //true
v::countrySubdivision('US')->validate('CA'); //true

This rule is case sensitive., (*8)

All data of this rule was extrated from GeoNames which is licensed under a Creative Commons Attribution 3.0 License., (*9)

The Versions

19/06 2015

dev-master

9999999-dev https://github.com/Respect/ValidationLocale

A set of Respect\Validation rules to work with localization

  Sources   Download

MIT

The Requires

 

The Development Requires

validation locale localization