struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Huber <>
Subject Changes on the validator field-validator required
Date Fri, 23 Feb 2018 11:10:01 GMT
We use  <field-validator type="required"> validator to make sure null is
not passed, but if I use a double it does not now validate, it wants a
Double for it to work.

Has there been any changes, or has it always been like this?

also, other validators work ie the min/max below, with the double.

<field name="bean.thePrice">
        <field-validator type="required">
            <message key="bean.theprice.required">unspecified key</message>
        <field-validator type="double">
            <param name="minInclusive">0</param>
            <param name="maxInclusive">2999</param>
            <message key="bean.theprice.range">unspecified key</message>

private double thePrice;
public double getThePrice() {
    return thePrice;
public void setThePrice(double thePrice) {
    this.thePrice = thePrice;
Cheers Greg

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message