[Skip to main content](#vessel-content)

#   Field validation

##

- **[StudioPrzyLesie](/forum/user/31654-studioprzylesie "View StudioPrzyLesie's Profile")**
- [![StudioPrzyLesie's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31654-studioprzylesie "View StudioPrzyLesie's Profile") Topic Author
- [ Offline](/forum/user/31654-studioprzylesie)

Less More

- Posts: 196
- Thank you received: 15
-
-

2 years 11 months ago [\#357379](#357379) by [StudioPrzyLesie](/forum/user/31654-studioprzylesie "View StudioPrzyLesie's Profile")  *[Field validation](/forum/27-checkout/907420-field-validation#357379 "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: (&#91;0-9&#93;{10})  Tom")* was created by *[StudioPrzyLesie](/forum/user/31654-studioprzylesie "View StudioPrzyLesie's Profile")*

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 ![:(](/media/kunena/emoticons/22.png ":(") Can it be configured differently?
Example:
Regular expression check: ([0-9]{10})

Tom

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNzQyMC1maWVsZC12YWxpZGF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86582
- Thank you received: 14322
-
-

2 years 11 months ago [\#357381](#357381) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Field validation](/forum/27-checkout/907420-field-validation#357381 "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: (&#91;0-9&#93;{10})  Tom")*

Hi,

I think the problem is with your regular expression.
You need to add anchors to it:
[ javascript.info/regexp-anchors](https://javascript.info/regexp-anchors)
So try instead: Code:

^([0-9]{10})$

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNzQyMC1maWVsZC12YWxpZGF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[StudioPrzyLesie](/forum/user/31654-studioprzylesie "View StudioPrzyLesie's Profile")**
- [![StudioPrzyLesie's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31654-studioprzylesie "View StudioPrzyLesie's Profile") Topic Author
- [ Offline](/forum/user/31654-studioprzylesie)

Less More

- Posts: 196
- Thank you received: 15
-
-

2 years 11 months ago [\#357403](#357403) by [StudioPrzyLesie](/forum/user/31654-studioprzylesie "View StudioPrzyLesie's Profile")  Replied by *[StudioPrzyLesie](/forum/user/31654-studioprzylesie "View StudioPrzyLesie's Profile")* on topic *[Field validation](/forum/27-checkout/907420-field-validation#357403 "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: (&#91;0-9&#93;{10})  Tom")*

Nicolas,
Great - that was it - thank you
Tom

The following user(s) said Thank You: [Philip](/forum/user/34318-philip "View Philip's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNzQyMC1maWVsZC12YWxpZGF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.059 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
