[hibernate-issues] [Hibernate-JIRA] Updated: (HV-143) Implemented BigDecimalRange Validator for BigDecimals with precision range and scale

Hardy Ferentschik (JIRA) noreply at atlassian.com
Fri Jun 26 05:02:34 EDT 2009


     [ http://opensource.atlassian.com/projects/hibernate/browse/HV-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hardy Ferentschik updated HV-143:
---------------------------------

    Component/s: legacy

> Implemented BigDecimalRange Validator for BigDecimals with precision range and scale
> ------------------------------------------------------------------------------------
>
>                 Key: HV-143
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-143
>             Project: Hibernate Validator
>          Issue Type: New Feature
>          Components: legacy
>            Reporter: Priya M
>         Attachments: BigDecimalRange.java, BigDecimalRangeValidator.java
>
>
> Currently, hibernate validator's do not have @Range or @Length for decimal numbers (like float, double and BigDecimal) for validating precision and scale simultaneously. Also, Hibernate doesn't generate correct db column types as Number(x,y) if Java Type is Float or Double. However it works only for BigDecimal. 
> I've added the annotation for BigDecimalRange and BigDecimalRangeValidator for the same
> Usage
> @BigDecimalRange(minPrecision=0, maxPrecision=13, scale=2)
>  public BigDecimal getFoo() {
>       return this.foo;
>  }
> It works for my app.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list