prevent these kinds of symbols "~!@#$%^&*()_+" input

Home Forums Quform WordPress prevent these kinds of symbols "~!@#$%^&*()_+" input

This topic is: not resolved
  • This topic has 1 reply, 2 voices, and was last updated 7 years ago by Ally.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #20999
    ericho09
    Participant

    Can I prevent any symbols input and only allow letter and number?

    How to set value not contain any symbols for codes below?

    function my_custom_validator($valid, $value, $element)
    {
    if ($value != ‘Foo’) {
    $element->addError(‘The value is not Foo’);
    $valid = false;
    }

    return $valid;
    }
    add_filter(‘iphorm_element_valid_iphorm_1_1’, ‘my_custom_validator’, 10, 3);

    Thank you

    #21015
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy