We want to draw your attention to a small update to the syntax for the input_validation tag. In the very first version of our documentation we mentioned that the input_validation tag requires an `as:` attribute to indicate the type of validation taking place. Since the input validation always ties back to an actual input and the type is defined in the input tag, this has been deprecated.
Input validation: string validation and multiple validations ➕
The attributes `min_length` and `max_length` have been added to the input_validation tag. These attributes allow (as the name suggests) to add validation on input size.
Next to that, we also allow multiple validations. Today, that might not feel groundbreaking, but with more validation types on the horizon (a little bird told me regex validation might be introduced soon as well) this will become super useful.
Finally, as a last addition to the input validation, we’ve refined the existing min/max validation with two new attributes: `min_exclusive`/`max_exclusive` validation.
Why does this matter? Well, the most common use-case to support these attributes is the scenario where we want to only allow positive or negative numbers in an input field. With the current min/max attributes set to 0, zero itself would also be accepted while zero is not positive nor negative strictly speaking. Hence, excluding zero is what we would need in that situation. Definitely check out our Community case as well on this topic to better understand the use-case!