=?iso-8859-1?Q?J=FCrgen_Hoffmann?= <[EMAIL PROTECTED]> writes: >Hi all again,
>The Code Snippet is here >http://jakarta.apache.org/turbine/turbine/turbine-2.3.1/xref/org/apache/turb >ine/services/intake/model/Field.html#201 That might look like a bug. However, this is the behaviour since day one. From looking at the code, the behaviour is even reasonable. :-) - If you put a validator into the intake.xml file, it is used: String validatorClassName = field.getValidator(); - If no user defined validator exists _and_ rules are available, then use the default validator if (validatorClassName == null && field.getRules().size() > 0) { validatorClassName = getDefaultValidator(); } => So the solution for you would be to explicitly state the default validator (org.apache.turbine.services.intake.validator.BooleanValidator) in the XML file. Does the current behaviour make sense? Depends on where you are looking. If we drop this statement, every field _will_ get a validator even if it has no rules. So we must review the validators that they behave like "no validator" in case no rules are around. I prefer to keep it the way it is unless you come up with a really good reason. I admit that it is some kind of "gotcha" with regards to Boolean fields. Regards Henning -- Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH [EMAIL PROTECTED] +49 9131 50 654 0 http://www.intermeta.de/ RedHat Certified Engineer -- Jakarta Turbine Development -- hero for hire Linux, Java, perl, Solaris -- Consulting, Training, Development What is more important to you... [ ] Product Security or [ ] Quality of Sales and Marketing Support -- actual question from a Microsoft customer survey --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
