Forum support

We provide good documentation for our free Joomla! extensions, including online documentatation directly in the administraton interface. If you need further individuel help with our free Joomla! extensions, you can subscribe for our payed support forum. Please apply for the paid forum support here and log in with the user id of the user with whom you have purchased the forum support.

Forum Support is free as long as you have an active Visforms Subscription or an active Subscription for the Bootstrap Carousel. Please just log in with your subscription user id.

Read-only use of the forums is free for everybody.

Topic-icon Custom Validation Not Working

More
3 months 1 week ago - 3 months 1 week ago #6396 by Chicitadel
Custom Validation Not Working was created by Chicitadel
Hello Admin,
I am trying to include a custom validation on some of the fields (email and phone number) thus far but noticed irrespective of the RegEx code used, the custom error text will just remain uncleared.

On a particular email field, I would want to restrict the input to only a particular domain, says example.com.
Note: all email usernames have two names separated by dot (.)

Regex tried are:
^\w+[.]+\w+[@][example[.][com]$
^\w+[.]+\w+[@][e][x][a][m][p][l][e][.][com]$
^\w+[.]\w+[@][e][x][a][m][p][l][e][.][com]$
^\w+[.]+\w+[@][e][x][a][m][p][l][e][.][c][o][m]$
^(\w+[.]+\w+[@][e][x][a][m][p][l][e][.][c][o][m])$

trying to validate
namea.nameb@example.com (for true)
and every other domain for false

The error remains
invalid input

On the phone field, I wanted to restrict input to the only French phone number
I tried the following

^([+][3][3][1-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])$

trying to validate +33111111111 or +33999999999 (for true, and every other country code for false)

Outcome: All validation gives the same invalid input (false). irrespective of the input.

Visforms Version 3.12.10
On Joomla! 3.9.13

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #6398 by Administrator
Replied by Administrator on topic Custom Validation Not Working
Hi,
I set up a test environment with 2 fields
E-Mail field: Custom validation ^(\w+[.]+\w+[@][e][x][a][m][p][l][e][.][c][o][m])$
Text field: Custom validation ^([+][3][3][1-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])$
When I enter This email address is being protected from spambots. You need JavaScript enabled to view it. into the e-Mail field, the regex validates to true. Other e-mails are not excepted
When I enter +33111111111 into the text field, the regex is validated to true. If I add an additional number, for example, I receive an "Invalid Input".

I'm sorry, I have no idea, why this is not working on your website. As many other people use custom validation without problems, I think this is not a problem with visForms but must be caused by some other circumstances which are individual to your website..

Regards,
Aicha

-- Visforms Developer --

I helped you? The best way to thank me is to post a review on Joomla! Extensions Directory or to use the donate button to the right and make a donation. :)

Always consult our documentations before asking a question on our forum, the answer is most probably there. ;)

Konnte ich dir helfen? Die beste Art mir zu danken ist es, ein Review auf Joomla! Extensions Directory zu schreiben oder den Spendenbutton rechts zu verwenden, um mir eine Spende zukommen zu lassen. :)

Bitte konsultiere immer zuerst unsere Dokumentationen bevor du eine Frage im Forum stellst, die Antwort ist bestimmt da. ;)

Enjoy Joomla!

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #6399 by Chicitadel
Replied by Chicitadel on topic Custom Validation Not Working
Thanks for the response admin,

I have tried tweaking some of the vis form field's setting but...
Do you think there is any other settings on visform field or advanced setting that must be set to true or false before using custom validation? Or any possible conditions?

Thanks

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #6401 by Administrator
Replied by Administrator on topic Custom Validation Not Working
Hi,
the "invalide value" is the result of the browser site validation with javascript.
So this could be related to some javascript problem...
Regards,
Aicha

-- Visforms Developer --

I helped you? The best way to thank me is to post a review on Joomla! Extensions Directory or to use the donate button to the right and make a donation. :)

Always consult our documentations before asking a question on our forum, the answer is most probably there. ;)

Konnte ich dir helfen? Die beste Art mir zu danken ist es, ein Review auf Joomla! Extensions Directory zu schreiben oder den Spendenbutton rechts zu verwenden, um mir eine Spende zukommen zu lassen. :)

Bitte konsultiere immer zuerst unsere Dokumentationen bevor du eine Frage im Forum stellst, die Antwort ist bestimmt da. ;)

Enjoy Joomla!
The following user(s) said Thank You: Chicitadel

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #6407 by Chicitadel
Replied by Chicitadel on topic Custom Validation Not Working
Thanks for the reply,
it worked now after updating to the beta version.
Additional observation why it may have not worked in the older visforms version could be related to the fact that I was using the custom validation for email on email field, and custom validation for phone on number field which may be creating additional validation behind the custom validation.

Thanks

Please Log in or Create an account to join the conversation.

Moderators: Administrator