Customize the validation error messages of validation.js in magento -


in magento application checkout page , displays error message using validation.js file.

when click continue in new billing address without entereing value displays error message this required field..

i want change message corresponding field name .

enter image description here

instead of error message need display first name required field..

how can ?

edit

this input box located in customer/widget/name.phtml as:

<input type="text" id="<?php echo $this->getfieldid('firstname')?>" name="<?php echo $this->getfieldname('firstname')?>" value="<?php echo $this->escapehtml($this->getobject()->getfirstname()) ?>" title="<?php echo $this->getstorelabel('firstname') ?>" maxlength="255" class="input-text validate-firstname" <?php echo $this->getfieldparams() ?> /> 

enter image description here

this output.

you can create class in validation.js file validate-firstname , add in validation.js file

 ['validate-firstname', 'first name required field.', function(v) {             return !validation.get('isempty').test(v);         }], 

search validate-alpha validation line , after put code in js file , add validate-firstname class in firstname input field.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -