xPDOMaxLengthValidationRule
Last updated Apr 12th, 2019 | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$287 per month—let's make that $500!
Learn moreWhat Does the Rule Do?¶
This rule verifies that a field has less than X number of chars, where X is defined by the "value" attribute in the XML schema.
Using the Rule¶
First, our model:
From there, go ahead and generate the model from the XML schema. And now in a Snippet we'll call Test:
This will display:
The name must be less than 10 characters.
See Also¶
- xPDOForeignKeyConstraint
- xPDOMaxLengthValidationRule
- xPDOMaxValueValidationRule
- xPDOMinLengthValidationRule
- xPDOMinValueValidationRule
- xPDOObjectExistsValidationRule
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$287 per month—let's make that $500!
Learn more