| Recommend this page to a friend! |
| Packages of Ramesh Narayan Jangid (Sharma) | Open Swoole Microservices | Rules-For-Custom-DataTypes-Configuration.md | Download |
|
|||||||||||||||||||||
Custom DataTypesDefining Custom DataTypesThe custom data types key's are classified in two sections depending on key's - Required / Optional key's RequireddataTypeThis can take one fo the PHP data type (bool, int, float, string). This is a required key. OptionalcanBeNullThis represents the Custom DataType can be NULL. This is an optional key. minValueThis represents the minimum value of the Custom DataType. This is an optional key. maxValueThis represents the maximum value of the Custom DataType. This is an optional key. minLengthThis represents the minimum length of the Custom DataType. This is an optional key. maxLengthThis represents the maximum length of the Custom DataType. This is an optional key. enumValuesThis represents Custom DataType should have any one value from the defined array. This is an optional key. setValuesThis represents Custom DataType should have values belonging in this array. This is an optional key. regexThis represents Custom DataType should pass this regular expression. This is an optional key. Custom DataTypes Example
Custom DataTypes Example
UsageWhen these data types are configured for a param in route or SQL config payload; there is a validation performed on the received data to fit the configured criteria of respective data type. ContributingIssues and feature request are welcome.<br /> Feel free to share them on issues page Author
Github: @polygoncoin LicenseCopyright © 2026 Ramesh N. Jangid (Sharma).<br /> This project is MIT licensed. |