Issue Details (XML | Word | Printable)

Key: HV-9
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Emmanuel Bernard
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Hibernate Validator

@Digits(integerDigits, fractionalDigits)

Created: 16/Dec/06 03:34 PM   Updated: 20/Jul/09 09:43 AM   Resolved: 19/Dec/06 12:09 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 3.0.0.ga

Time Tracking:
Not Specified

File Attachments: 1. Java Source File Digits.java (0.4 kB)
2. Java Source File DigitsValidator.java (2 kB)


Participants: Davide Baroncelli, Emmanuel Bernard, Guilherme de Azevedo Silveira, Max Rydahl Andersen and Norman Richards


 Description  « Hide

@Digits(integerDigits=8, fractionalDigits=2)
ensure that the number can be expressed with integerDigits digits and factionalDigits digits



Emmanuel Bernard added a comment - 16/Dec/06 03:34 PM

and propagate to column definition


Norman Richards added a comment - 16/Dec/06 11:02 PM

Here's what I am using to accomplish this in the seampay example.


Norman Richards added a comment - 16/Dec/06 11:08 PM

I don't understand how PropertyConstraint works, so I was unable to implement apply(). I'll be happy to do that part too, if someone can explain exactly what it does. (the docs are lacking in that regard)


Emmanuel Bernard added a comment - 17/Dec/06 05:39 PM

you should do something similar to what LengthValidator is doing but with setPrecision and setScale


Emmanuel Bernard added a comment - 19/Dec/06 12:09 PM

Still need translation


Emmanuel Bernard added a comment - 20/Dec/06 04:14 PM

numeric value out of bounds (<{integerDigits} digits>.<{fractionalDigits} digits> expected)


Guilherme de Azevedo Silveira added a comment - 20/Dec/06 07:06 PM

brazilian portuguese (pt-br)
valor numérico fora do padrão (esperado <{integerDigits}> dígitos,<{fractionalDigits} dígitos)


Max Rydahl Andersen added a comment - 21/Dec/06 12:41 AM

Danish/DK:
værdien er ikke inden for det forventede (<{integerDigits} heltal>.<{fractionalDigits} decimaler>)


Davide Baroncelli added a comment - 21/Dec/06 04:02 PM

it-IT: "valore numerico fuori dai limiti (atteso <{integerDigits} cifre>.<{fractionalDigits} cifre>)"