Magento News

 

Validate password fields while current password field has value in magento

I’m having change password form in magento Account Information page.Here I want to validate password fields(password,confirm password,current password) while current password has value.Otherwise it should not validate.

In magento 1.5.1.0 really easy field validation is used to validate the forms.

I know addClassName add the validate like below

    $('current_password').addClassName('required-entry');
    $('password').addClassName('required-entry');
    $('confirmation').addClassName('required-entry');

removeClassName this one removes validation

$('current_password').removeClassName('required-entry');
$('password').removeClassName('required-entry');
$('confirmation').removeClassName('required-entry');

But how can i apply only while current_password has value.I’m not familiar with prototype.js functions .Kindly help me

Validate password fields while current password field has value in magento

Possibly Related Posts:


 

Leave a Reply