Closed (fixed)
Project:
Password Policy
Version:
6.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Jul 2011 at 08:53 UTC
Updated:
16 May 2012 at 18:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
frankcarey commentedYeah, just needed to actually check if the contraint is true (or evaluates to true). This should work, but I don't have time to test it. It is patched against my other patch that provides the ability to check names of new users, so you will have to apply that first. See http://drupal.org/node/1226434#comment-4770124
Man, 3 patches for me to get this working :(
Comment #2
jgalletta commentedYour patch works fine for the server side validation, but you forgot to also patch the javascript part :)
The same if with a return ''; if !$constraint in the js validation function should be fine.
Comment #3
jgalletta commentedThe server side validation patch works fine for me, now need a patch for client-side validation.
Comment #4
erikwebb commentedAgreed, the patch in #1 looks like a win for the server-side. Any attempts on the JS side?
Comment #5
erikwebb commentedActually, I just tried to reproduce the problem and wasn't able to. I add a new policy, set username to '1', receive the error. Then erase the username value, then the error goes away.
I've attached a patch that should fix this problem, but I'm not really able to see what the problem is at the moment.
Comment #6
jgalletta commentedWorks for me, I wrote the same code a while back and it's working on live site since this time.
Comment #8
erikwebb commentedI introduced a bug with that patch actually. The test itself was also broken. Re-running the tests with a new patch.
Comment #9
erikwebb commentedhttp://drupalcode.org/project/password_policy.git/commit/fd4557a