regex

  • Roberto
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 8 months ago #153006 by Roberto
regex was created by Roberto
Hi,
in custom fields
I insert a new field (Italian tax code)
Text
input mask: /^[A-Za-z]{6}[0-9]{2}[A-Za-z]{1}[0-9]{2}[A-Za-z]{1}[0-9]{3}[A-Za-z]{1}$/
testing here  regex101.com/r/bE9iG6/1

But in the form, I can't insert any character.

where am i wrong?
Roberto

 

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

More
1 year 8 months ago #153013 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic regex
For validating Italian tax code, maybe you should try to use built-in server validation rules instead. Edit the field, set Server Validation Rules to CodiceFiscale

Then check to see if it works (removes the input mask which you configured in the field before)

Tuan

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

  • Roberto
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 8 months ago #153172 by Roberto
Replied by Roberto on topic regex
Like this
But it doesn't work
if I enter random characters it doesn't alert me that it's wrong 

 

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

More
1 year 8 months ago #153173 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic regex
As it is a sever validation, the error message will only displayed when you submit the form / process subscription. It won't be displayed as soon as you entering the tax code. Could you please try to enter a wrong tax code, then process subscription to see if there is any error message displayed?

Tuan

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

Moderators: Tuan Pham Ngoc