Support › General › Validation and Sanitization with JS
Is it possible to do Validation and Sanitization with JS?
I want to use https://github.com/jackocnr/intl-tel-input to validate my field, and then when the form is submitted I want to save the raw value (using iti.getNumber()) and not the formatted value, to the db.
Is this possible?
I think it is possible. You can create your own custom JS code and listen to the submit button, when the action click is fired, run your own code to validate the field.
Otherwise, you can look for a PHP library or snippets and use the callback function to validate/sanitize the field value.