Returns a validation function to validate that the length of the value is less than or equal to the max length, if given.
Note: null values count as valid.
Optional
The maximum allowed length of a value.
A custom error message to display if the value is invalid.
Returns a validation function to validate that the length of the value is less than or equal to the max length, if given.
Note: null values count as valid.