I am using ConfiForms and need to add a validation rule. When a user enter an email address that does not end with ".mil" I want the validation rule to display error message.I need assistance building the regex to do this validation. Thank you.
Add a validation rules that checks that in a condition
!*.mil
No need for the regular expression if you want to check only that the text ends with a .mil
Hi @Alex Medved _ConfiForms_ this works great but I need to make this part of a rule because it will need to work in conjuction with another check. See I have a checked ration button called DoD, so if the user select Yes for the DoD button then the email address MUST end with ".mil".
The code you gave me is great for the validation within the field definition, but when I add it to a rule it is not getting picked up, not sure what I am missing. Here is what I have so far
Extend the condition to include the check for the radio button field
something like
Myradio:DOD AND !TestMil:.mil
Thank you so much!!!! I had the "!" on the wrong spot :-)
@Alex Medved _ConfiForms_ following on this one, I have to add a second check, and it is failing. Does ConfiForms not like "OR"? see my code below:
Action:create AND RequestorDoD:Yes AND (!RequestorEmail:*.mil) OR (!RequestorEmail:*@nsa.gov)
When this should trigger?
If I understand your intent right then it should be something like this
Action:create AND RequestorDoD:Yes AND !RequestorEmail:*.mil AND !RequestorEmail:*@nsa.gov
So, when the user tries to submit the form, if they are creating an account (Action:create) and they selected "yes" for DoD (RequestorDoD:Yes) then their email address must end with EITHER "*.mil" or "*@nsa.gov"
It looks like you're new here. Sign in or register to get started.