VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: GJC Web Design on October 20, 2013, 21:27:13 PM

Title: password required not validating
Post by: GJC Web Design on October 20, 2013, 21:27:13 PM
Hi

2.0.24

the ($_fld->required ? ' class="required"' : '') is missing (unless there's a reason for it) in administrator/components/com_virtuemart/models/userfields.php ~ line 861

original
case 'password':
case 'password2':
$_return['fields'][$_fld->name]['formcode'] = '<input type="password" id="' . $_prefix.$_fld->name . '_field" name="' . $_prefix.$_fld->name . '"  size="30" class="inputbox" />'."\n";
break;


changed to
case 'password':
case 'password2':
$_return['fields'][$_fld->name]['formcode'] = '<input type="password" id="' . $_prefix.$_fld->name . '_field" name="' . $_prefix.$_fld->name .'" '.($_fld->required ? ' class="required"' : ''). ' size="30" class="inputbox" />'."\n";
break;


validates nicely now

cheers

[attachment cleanup by admin]
Title: Re: password required not validating
Post by: AH on October 20, 2013, 22:28:05 PM
Does this not mess up optional registration??
Title: Re: password required not validating
Post by: GJC Web Design on October 20, 2013, 22:53:08 PM
Could very well  ;)

But I have an ingrained hatred of non registering shops - refuse to build them cos I find the whole concept ridiculous.. so never tested

but then I'm just an old moaner..  :)

so in a word I don't know - but many clients ask me why the signup page is such a mix of asterisks, red errors and non red errors
Think it's better to have consistent validation...
this one at least it's all of a piece.. so not a bug - perhaps should be moved (the topic?)

cheers
Title: Re: password required not validating
Post by: AH on October 20, 2013, 23:50:17 PM
LOL

We have exactly the opposite view of registration.  We want to get customers through to paying asap and as most only visit us once, we let them register if they want to but don't force them.

I will leave the post here though.