Closed lbain closed 10 years ago
You can control this behavior on a per-constraint basis by using the ignoreEmpty
parameter (e.g. @Numeric(ignoreEmpty=true)
, or globally by doing:
regula.configure({
validateEmptyFields: false
});
I have this in the release notes, but unfortunately I haven't gotten around to updating the documentation! I hope to get to this soon.
It seems that using @Numeric also makes the field required. I think it would be more flexible for those to be two separate constraints, and for the user to decide if they should use "@Numeric @Required" or just "@Numeric" for optional fields.