function password_policy_constraint_length_js in Password Policy 6
Same name and namespace in other branches
- 7 constraints/constraint_length.inc \password_policy_constraint_length_js()
Javascript portion.
File
- constraints/constraint_length.inc, line 36 
- Password policy constraint callbacks.
Code
function password_policy_constraint_length_js($constraint, $uid) {
  $s = '';
  $s .= "  if (!value.length || value.length<{$constraint}) {\n";
  $s .= "    strength=\"low\";\n";
  $s .= "    msg.push(translate.constraint_length);\n";
  $s .= "  }\n";
  return $s;
}