Propel ORM validators support!
Note: This feature is currently available only in beta-version 1.4.5. If you want to try it, please download latest version from http://www.orm-designer.com/beta.
While working on a new ORM Designer version we prepared one significant improvement of the current ORM Designer version for all Propel ORM users.
From now, ORM Designer natively supports all Propel core PHP validators mentioned in the documentation.
The usage is simple, as usually ;-). Create an object, add few fields and commit changes. Then select desired field of the model and look to the ORM Properties editor:
Now, when you click on the add icon you can choose from the list of available validators or choose one of two special items “otherValidator” or “customValidator”:
- OtherValidator use in special cases when you want to use validator which isn’t listed in this list. This validator choose if you would like to enter all validator identificators like name,value and message and these values will be added to the specific column.
- CustomValidator is there for cases when you have implemented your own validator and want to use it in a specific column. In this case simply add a class name to this validator and ORM Designer will export it for you.
You can have zero,one or more validators of one type for one column because of multiple instances of custom or other validator. Here are few examples of already configured validators:
Now, when you press “Export” button, your XML file will look like this:
Note: Validators aren’t supported for YAML export, because there isn’t support in Propel ORM! (there is link: http://trac.symfony-project.org/ticket/1769)