Hi,
I have a workflow that requires the user to define a new password that must meet complexity requirements. The workflow uses custom validation on a field within the form based on the below action:
var length = /^[\s\S]{8,32}$/,
upper = /[A-Z]/,
lower = /[a-z]/,
number = /[0-9]/,
special = /[^A-Za-z0-9]/,
count = 0;
// Check password meets length requirement
if (length.test(password)) {
// Only need 3 out of 4 of these to match
if (upper.test(password)) count++;
if (lower.test(password)) count++;
if (number.test(password)) count++;
if (special.test(password)) count++;
}
else {
return "Password does not meet length requirements"
}
if (count < 3){
return "Password does not meet complexity requirements"
}
else {
return true
}
For the password input parameter call I am using #__current, which works through the vRO client but doesn't work via the vCenter plugin. In this instance, no matter what is entered it just returns "Password does not meet complexity requirements". Can someone assist with getting this working?