Password plugin : empty value allways checked even if hidden

dranreb_38

New Member
Hello
I use password plugin in a form, but in a conditional way. When password is not required, I hide it in the form (using Javascript on another element). I have a non-empty validation but I use Validate hidden toggle to put the validation off in this case. But password presence is allways checked in any case... (even if I remove non-empty validation)
Worked as expected in 3.5, but now I'm using 3.8.1 release, and this problem is new...
How to deal with ?
Thx
Dran
 
Not sure how it worked as expected in 3.5, as I didn't add that "validate hidden" option till 3.7.

The issue is that the "validate hidden" option is only applied to validation rules. But the password element isn't using a validation rule, it's using a built in element validation method, which always runs. And I don't see any

I'd have to add a specific "Validate if hidden" option to the password element itself.

-- hugh
 
Thanks for answering, Hugh.
I also dont know why it seemed to work before. Suppose checking was different in the element itself.
For sure I understand that my non-empty validation is useless now, as always checked in element.
Seems to me the element should simply accept password to be empty, as this validation can be checked by a validation rule...
When you say "I'd have to add...", do you mean you'll change something in a near new release ? If not, can you suggest me a modification in element code to do that ?
Thx a lot
Dran
 
Seems to me the element should simply accept password to be empty, as this validation can be checked by a validation rule...

The internal validation doesn't specifically check for empty, it just checks that the confirmation matches, and optionally runs the J! password rule (which you set in the password element options), which is what is rejecting empty strings.

When you say "I'd have to add...", do you mean you'll change something in a near new release ? If not, can you suggest me a modification in element code to do that ?

If you'd like to take out a sub for a month, I'll add it.

-- hugh
 
Thank you, but the thing is that setting J! password rule option to yes or no doesn't change anything... I allways get the message : "Vous devez entrer un mot de passe" (in french because my site is in french...)
Dran
 
Oh, yeah, sorry, our code does test for empty. So I'd also have to add an option to allow empty passwords as well, if you needed that. Note that Joomla doesn't allow empty passwords, although I get that some folk use the password element for things other than J! passwords.

So yeah, if you take out a sub, I can add those features for you.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top