I tried your solution and I can not seem to get it work…
Library Code:
function USSCheck($uss) {
3|
4| $regex = "/^(?!023)(?!0229.[13579])(?!0229[02468][26])(?!0229[13579][048])(?!(0[469]|11)31)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])([0-9]{2})(?!.?
Running from a regular PHP file - this function works (1 for good, 0 for bad)
My onValidate code is as follows (just using sc_alert() to see the flow):
$ussno = {USSNumber};
if (strlen ($ussno) == 0) {
sc_alert(“USS Blank”);
return;
}
if (strlen ($ussno) != 14) {
sc_alert(“USS Length Incorrect”);
return;
}
sc_alert(“USS TEST: “.USSCheck($ussno).””);
No matter what - it fails on ANY 14 digit value that is correct or wrong! (A valid one would be “101799JOHQPUBL”)
Any advice?