Validation and Sanitization with JS

Support General Validation and Sanitization with JS

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43140
    shmaltzshmaltz
    Participant

    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?

    #43147
    PeterPeter
    Moderator

    Hello,

    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.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.