- Non mandatory fields can be empty, even if a validation pattern was specified.

SVN:trunk[434]
This commit is contained in:
Denis Flaven
2010-06-06 17:05:08 +00:00
parent ef38dac045
commit 9c43da711e

View File

@@ -155,6 +155,11 @@ function ValidateField(sFieldId, sPattern, bMandatory, sFormId)
{
bValid = false;
}
else if ((currentVal == '') || (currentVal == 0))
{
// An empty field is Ok...
bValid = true;
}
else if (sPattern != '')
{
re = new RegExp(sPattern);