|
What is a validator |
An object that checks values against its constraint settings and returns error messages |
Validators are used by the validateGetErrorString method defined by PntObject. The constraint settings usually come from a property descriptor, but may be set some other way too.
The class also defines the common number, date, etc. formats used internally by the domain model in static methods. If combined with a stingConverter or certain php functions these can be used to convert the internal data types into other internal data types. Implicit conversions may be used too.
Error messages can be localized on the class, see for an example. |
|