• please how can i set validation to ensure user types in numbers only with a minimum and maximum number value. and i dont want to use the number field because is has that increment button which i dont want. however i prefer to use the text field but ensure that users put only numbers of 8digits.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter pandglobal

    (@pandglobal)

    the limit characters only shows maximum without any minimum, but what i want is to force users to put 8digit must that is 8characters minimum and 8characters maximum

    Plugin Contributor sarkparanjothi

    (@sarkparanjothi)

    Add to theme front-end javascript file below lines.
    After document ready

    //wccff_field_id – text field selector
    $( “wccff_field_id” ).attr( “pattern”, “[0-9]{8}” );

    Thread Starter pandglobal

    (@pandglobal)

    after adding the code, is there a shortcode to use in any text field that i want it to only accept numbers? how do i detect which text field may have this validation?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HOW CAN I SET VALIDATION’ is closed to new replies.