You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR was squashed before being merged into the 2.x branch.
Discussion
----------
[LiveComponent] Add validation modifiers (min_length, max_length, min_value, max_value) to data-model inputs
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| Docs? | yes
| Issues |
| License | MIT
**[LiveComponent]**
This PR introduces support for input validation modifiers used in data-model, including:
- min_length(x)
- max_length(x)
- min_value(x)
- max_value(x)
These modifiers prevent model updates and AJAX calls if the user input doesn't meet the validation constraints.
It helps avoid unnecessary re-renders and network traffic.
They can be combined with other modifiers like debounce.
```twig
<input data-model="name|min_length(3)" />
<input data-model="price|min_value(1)|max_value(100)" type="number" />
```
Commits
-------
7c015e3 [LiveComponent] Add validation modifiers (min_length, max_length, min_value, max_value) to data-model inputs
0 commit comments