- Posts: 196
- Thank you received: 15
Field validation
- StudioPrzyLesie
-
Topic Author
- Offline
Less
More
2 years 11 months ago #357379
by StudioPrzyLesie
Field validation was created by StudioPrzyLesie
Hi,
For example, I have a simple validation of the VAT number field, where it should check whether 10 digits have been entered. If I enter less than 10 - a message pops up, but if I add 11 - it saves without problems
Can it be configured differently?
Example:
Regular expression check: ([0-9]{10})
Tom
For example, I have a simple validation of the VAT number field, where it should check whether 10 digits have been entered. If I enter less than 10 - a message pops up, but if I add 11 - it saves without problems
Example:
Regular expression check: ([0-9]{10})
Tom
Please Log in or Create an account to join the conversation.
2 years 11 months ago #357381
by nicolas
Replied by nicolas on topic Field validation
Hi,
I think the problem is with your regular expression.
You need to add anchors to it:
javascript.info/regexp-anchors
So try instead:
I think the problem is with your regular expression.
You need to add anchors to it:
javascript.info/regexp-anchors
So try instead:
Code:
^([0-9]{10})$
Please Log in or Create an account to join the conversation.
- StudioPrzyLesie
-
Topic Author
- Offline
Less
More
- Posts: 196
- Thank you received: 15
2 years 11 months ago #357403
by StudioPrzyLesie
Replied by StudioPrzyLesie on topic Field validation
Nicolas,
Great - that was it - thank you
Tom
Great - that was it - thank you
Tom
The following user(s) said Thank You: Philip
Please Log in or Create an account to join the conversation.
Time to create page: 0.039 seconds