Hi @sunshine
I hope you’re well today and thank you for your question!
This would be a question for our developers mostly so I’ll be happy to ask them for advice but I’m sure they’ll ask for more information.
Would you please tell a bit more of what/how you want to validate and/or what/what kind of code you’d like to use?
Let us know (maybe a simple example or code and expected outcome?) and we’ll ask our developers for suggestions on how to “hook it up” to Forminator.
Best regards,
Adam
Thanks for the quick response.
One thing I want to do is compare two email fields to ensure that they are equal. If not, like the other validations you add via the Forminator UI, it should halt form submission and display an error message.
In my case, this will be fields email-1 and email-2.
Since the aforementioned library is what is being used, I first tried calling jQuery.rules() using the equalTo rule and messages as the library documentation describes. But for some reason the rules() method could not be found no matter what I did.
So when I saw that there was other stuff going on anyway, I tried to call the custom methods that Forminator has, like ForminatorFrontValidate() but I believe that was when I only succeeded in replacing the validation rules, not adding to them.
I am probably close(?) I just can’t see it, LOL.
Ah, I think I may have figured it out.
I use the forminator_field_email_validation_rules and forminator_email_field_validation_message filters, do I have that right?
If that is right I will post back example code for others looking to do similar when I have it working.
Hello @sunshine ,
We haven’t heard from you for some time now, so it looks like you don’t have any more questions for us.
Feel free to re-open this ticket if needed.
Kind regards
Kasia