1

I am Using Magento 1.9.1

Gómez nº

these letters are not allowing in my customer form. please help.

2
  • Which validation class you have used in input box? Jul 22, 2016 at 9:49
  • validate-alphanum-with-spaces
    – Crock
    Jul 22, 2016 at 9:53

1 Answer 1

0

go to js/prototype/validation.js you can only allowed the character for that and spaces

['validate-alphanum-with-spaces', 'Please use only letters (a-z or A-Z), numbers (0-9) or spaces only in this field.', function(v) {
   return Validation.get('IsEmpty').test(v) || /^[a-zA-Z0-9 ]+$/.test(v)
            }],

solution this expression you need for latin test and working

['validate-alphanum-with-spaces-with-latin', 'Please use only letters (a-z or A-Z), numbers (0-9) or spaces only in this field.', function(v) {
                        return Validation.get('IsEmpty').test(v) || /^[ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏàáâãäåæçèéêëìíîïÐÑÒÓÔÕÖØÙÚÛÜÝÞßðñòóôõöøùúûüýþÿ a-zA-Z0-9 ]+$/.test(v)

     }],
23
  • now, what i have to do ? need to the function in validation js?
    – Crock
    Jul 22, 2016 at 9:58
  • i need to update the function , and also have to change the class name in the form too ? sir !!
    – Crock
    Jul 22, 2016 at 10:01
  • "validate-alphanum-with-spaces " this is the name of the class sir?
    – Crock
    Jul 22, 2016 at 10:03
  • actually I have the same function on Line 488. its doesnot support latin letter.
    – Crock
    Jul 22, 2016 at 10:14
  • Is there any way to add the function and edit the function to allow the latin letters? without remove the class name?
    – Crock
    Jul 22, 2016 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.