Author: michiel
Date: 2010-03-19 10:59:23 +0100 (Fri, 19 Mar 2010)
New Revision: 41532
Modified:
mmbase/branches/MMBase-1_8/html/mmbase/validation/validation.js.jsp
Log:
backported small detail
Modified: mmbase/branches/MMBase-1_8/html/mmbase/validation/validation.js.jsp
===================================================================
--- mmbase/branches/MMBase-1_8/html/mmbase/validation/validation.js.jsp
2010-03-19 03:39:47 UTC (rev 41531)
+++ mmbase/branches/MMBase-1_8/html/mmbase/validation/validation.js.jsp
2010-03-19 09:59:23 UTC (rev 41532)
@@ -648,13 +648,15 @@
if (this.isCheckEquality(el)) {
return true; // not yet supported
}
-
- if (this.isRequired(el) && this.enforce(el, el.mm_isrequired_enforce)) {
- if (value == "") {
- return false;
+ if (! this.isString(el)) { // For Strings, you cannot enter 'null'. The
empty string is interpreted as "" in
+ // stead. So skip the 'required' checks.
+ if (this.isRequired(el) && this.enforce(el, el.mm_isrequired_enforce))
{
+ if (value == "") {
+ return false;
+ }
+ } else {
+ if (value == "") return true;
}
- } else {
- if (value == "") return true;
}
if (! this.typeValid(el)) return false;
if (! this.lengthValid(el)) return false;
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs