input-number
input-number copied to clipboard
Add Validator callback and provide prevValue in Parser callback
This PR enhances the component by adding a new callback: Validator
, which prevents the input from changing if the value does not pass the validation. This is useful to prevent users from inputting unwanted characters in the input.
The Parser callback has also been enhanced with a new info
second param that returns the previous value. This is useful for formatting or validation purposes when one is modifying the value and needs to compare the old and new values.