Form Validation

This topic contains 6 replies, has 3 voices, and was last updated by  Paolo 8 years, 6 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #57000

    John Ashok
    Expired Member
    Post count: 6

    Hi there,

    Any idea if i can put in validation in the form fields ?

    #57088

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    The validation currently provided is mainly for mandatory fields.
    Then each field may have extra validation, like email will check if the email format is valid for example.

    What kind of validation are you talking about?

    Possibly you could enqueue your own extra JS file for validation.

    Let us know,

    Thanks

    #57089

    Guust
    Moderator
    Post count: 29970

    Yes, that is possible for a limited few of them, it just depends what you want.
    Can you be more specific?

    #57169

    John Ashok
    Expired Member
    Post count: 6

    Some basic validations which needs to be for form fields.

    1. Max characters. (e.g max 30 characters).
    2. Min characters. (e.g min 30 characters).
    3. Number field validation (is numeric value validation).
    4. Special character validation.
    5. Max x or min x selections for mutli-select dropdown.
    6. Aphanumeric text only.

    Do the fields have any of these options provided by default from GD custom posttype plugin?

    Validation 1,2,3,5 needs to there as won’t be any restriction on input provided by the user.

    For us to use our own extra JS file for validation we need some control over the fields on the add custom listing page (front-end submission form). Is there any way to add classes to those fields?

    If none of the above is present are there any hooks or filter which can be used for validation purpose?

    #57234

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    all fields have classes already. Otherwise our own validation wouldn’t work. So you should be able to write your own JS validation.

    However none of the above is provided out of the box.

    Thanks

    #58035

    John Ashok
    Expired Member
    Post count: 6

    Guust, Paolo,

    Is there any chance that you would be offering the following validations in a future upgrade. If so, do you have a time-frame in mind?

    1. Max characters. (e.g max 30 characters).
    2. Min characters. (e.g min 30 characters).
    3. Number field validation (is numeric value validation).
    4. Special character validation.
    5. Max x or min x selections for mutli-select dropdown.
    6. Aphanumeric text only

    Cheers,

    John

    #58065

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    I know Stiofan was adding few extra html5 validation, but I’m sure they won’t include user variables like Max characters/Min characters.

    If you wish to have such specific validation you must consider your own js file.

    Thanks

Viewing 7 posts - 1 through 7 (of 7 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket