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

#   address-validation is buggy?

##

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

Less More

- Posts: 154
- Thank you received: 4
-
-

14 years 1 month ago [\#67274](#67274) by [olivnewton](/forum/user/9482-olivnewton "View olivnewton's Profile")  *[address-validation is buggy?](/forum/2-general-talk-about-hikashop/67274-address-validation-is-buggy#67274 "hello, i just noticed that if someone enters his address-details in login and / or billing / shipping address, if one required field is missing, then the input-field has a red border (styling of class...")* was created by *[olivnewton](/forum/user/9482-olivnewton "View olivnewton's Profile")*

hello, i just noticed that if someone enters his address-details in login and / or billing / shipping address, if one required field is missing, then the input-field has a red border (styling of class .invalid), which is OK. but after entering some data into that field, and leaving another one empty, the new one gets of course the red border as well, but the old fixed one keeps its red border, even though now valid. i checked with firebug, and found out that the .invalid class does not get removed. is this a bug?

same happens also for the modals in "add new address"

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzY3Mjc0LWFkZHJlc3MtdmFsaWRhdGlvbi1pcy1idWdneT90bXBsPW1hcmtkb3du) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

14 years 1 month ago [\#67386](#67386) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: address-validation is buggy?](/forum/2-general-talk-about-hikashop/67274-address-validation-is-buggy#67386 "hello, i just noticed that if someone enters his address-details in login and / or billing / shipping address, if one required field is missing, then the input-field has a red border (styling of class...")*

It's not a bug. It's just that we don't remove the invalid class.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzY3Mjc0LWFkZHJlc3MtdmFsaWRhdGlvbi1pcy1idWdneT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 154
- Thank you received: 4
-
-

14 years 1 month ago [\#67390](#67390) by [olivnewton](/forum/user/9482-olivnewton "View olivnewton's Profile")  Replied by *[olivnewton](/forum/user/9482-olivnewton "View olivnewton's Profile")* on topic *[Re: address-validation is buggy?](/forum/2-general-talk-about-hikashop/67274-address-validation-is-buggy#67390 "hello, i just noticed that if someone enters his address-details in login and / or billing / shipping address, if one required field is missing, then the input-field has a red border (styling of class...")*

?
excuse if i am not understanding this...

how am i supposed to style back to not-red-border when the field has been corrected?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzY3Mjc0LWFkZHJlc3MtdmFsaWRhdGlvbi1pcy1idWdneT90bXBsPW1hcmtkb3du) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

14 years 1 month ago [\#67681](#67681) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: address-validation is buggy?](/forum/2-general-talk-about-hikashop/67274-address-validation-is-buggy#67681 "hello, i just noticed that if someone enters his address-details in login and / or billing / shipping address, if one required field is missing, then the input-field has a red border (styling of class...")*

You need to modify the javascript code in the file media/com_hikashop/js/hikashop.js in order to remove the class from the elements.

Replace the line:
if(!isValid){

by:
if(isValid){
elementToCheck.className.replace( /(?:^&#124;\s)invalid(?!\S)/g , '' );
}

in that file and that should do it once you clear your browser's cache.

The following user(s) said Thank You: [olivnewton](/forum/user/9482-olivnewton "View olivnewton's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzY3Mjc0LWFkZHJlc3MtdmFsaWRhdGlvbi1pcy1idWdneT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 154
- Thank you received: 4
-
-

14 years 1 month ago [\#67701](#67701) by [olivnewton](/forum/user/9482-olivnewton "View olivnewton's Profile")  Replied by *[olivnewton](/forum/user/9482-olivnewton "View olivnewton's Profile")* on topic *[Re: address-validation is buggy?](/forum/2-general-talk-about-hikashop/67274-address-validation-is-buggy#67701 "hello, i just noticed that if someone enters his address-details in login and / or billing / shipping address, if one required field is missing, then the input-field has a red border (styling of class...")*

thanks for the tip!
unfortunately your replacement wouldnt work...

this works though:
Code:

if(isValid){ elementToCheck.removeClass('invalid'); } else {

no offense, but:
you should definitely include this in the next update!
its like buying a BMW, and the low-full-alert appears on the controls-screen.
after refueling, its still red, you call BMW-Service and they tell you how to fix it yourself... ![;-)](/media/kunena/emoticons/24.png ";-)")

but: great, fast support, as usual!!!
thanks!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzY3Mjc0LWFkZHJlc3MtdmFsaWRhdGlvbi1pcy1idWdneT90bXBsPW1hcmtkb3du) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

14 years 1 month ago [\#67737](#67737) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: address-validation is buggy?](/forum/2-general-talk-about-hikashop/67274-address-validation-is-buggy#67737 "hello, i just noticed that if someone enters his address-details in login and / or billing / shipping address, if one required field is missing, then the input-field has a red border (styling of class...")*

removeClass won't work without jquery.
Your modification can't be included.

Try like that then :
if(isValid){
elementToCheck.className.replace(new RegExp('(\\s&#124;^)invalid(\\s&#124;$)'),' ').replace(/^\s+&#124;\s+$/g, '');
}

The modification will be included if we can validate it.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzY3Mjc0LWFkZHJlc3MtdmFsaWRhdGlvbi1pcy1idWdneT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 154
- Thank you received: 4
-
-

14 years 1 month ago [\#67744](#67744) by [olivnewton](/forum/user/9482-olivnewton "View olivnewton's Profile")  Replied by *[olivnewton](/forum/user/9482-olivnewton "View olivnewton's Profile")* on topic *[Re: address-validation is buggy?](/forum/2-general-talk-about-hikashop/67274-address-validation-is-buggy#67744 "hello, i just noticed that if someone enters his address-details in login and / or billing / shipping address, if one required field is missing, then the input-field has a red border (styling of class...")*

...but it will work with mootools, and mootools is joomla standard enabled

your solution does not work for me:
".invalid" does not get removed!

i keep adding the " else {" otherwise it wouldn work at all, i hope this is correct

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzY3Mjc0LWFkZHJlc3MtdmFsaWRhdGlvbi1pcy1idWdneT90bXBsPW1hcmtkb3du) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

14 years 1 month ago [\#67905](#67905) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: address-validation is buggy?](/forum/2-general-talk-about-hikashop/67274-address-validation-is-buggy#67905 "hello, i just noticed that if someone enters his address-details in login and / or billing / shipping address, if one required field is missing, then the input-field has a red border (styling of class...")*

We put some other more complex code and properly tested it on our end.

It will be added in next version.
In the mean time you can use your solution.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzY3Mjc0LWFkZHJlc3MtdmFsaWRhdGlvbi1pcy1idWdneT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 154
- Thank you received: 4
-
-

14 years 1 month ago [\#68044](#68044) by [olivnewton](/forum/user/9482-olivnewton "View olivnewton's Profile")  Replied by *[olivnewton](/forum/user/9482-olivnewton "View olivnewton's Profile")* on topic *[Re: address-validation is buggy?](/forum/2-general-talk-about-hikashop/67274-address-validation-is-buggy#68044 "hello, i just noticed that if someone enters his address-details in login and / or billing / shipping address, if one required field is missing, then the input-field has a red border (styling of class...")*

i see. ok.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzY3Mjc0LWFkZHJlc3MtdmFsaWRhdGlvbi1pcy1idWdneT90bXBsPW1hcmtkb3du) or [Create an account](/register) 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.068 seconds

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