Validations
Haska managing validations of your models so easily by set options as validations. Then your model props will be validate in restful API endpoints and also in your admin dashboard create or edit forms. When you click on validation configure button you can reach to the below popover.
The following table summarizes Haska validations for each model.
We do not have required option for validation part because initial prop works like required validation which described on properties.
Key | Type | Descripion |
initial | Boolean | Whether the property is required. |
pattern | String | Regular expression pattern that a string should match |
max | Number | Maximum length for string types. |
min | Number | Minimum length for string types. |
length | Number | Maximum size of a specific type, for example for CHAR types. |
Last updated