Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make NumericValidator locale-independent #1236

Closed
eugeneRover opened this issue Sep 29, 2022 · 1 comment
Closed

Make NumericValidator locale-independent #1236

eugeneRover opened this issue Sep 29, 2022 · 1 comment

Comments

@eugeneRover
Copy link

NumericValidator now offers single constructor - NumericValidator(String attribute), and contains hardcoded locale-dependent NumberFormat

It would be great to get a possibility to specify custom number format in constructor, like this:

    public NumericValidator(String attribute, NumberFormat numberFormat){
         this.attribute = attribute;
         this.numberFormat = numberFormat ;
    }

and make old constuctor behave the same way, to keep backward compatibility :

    public NumericValidator(String attribute){
         this (attribute, NumberFormat.getInstance());
    }
@ipolevoy
Copy link
Member

@eugeneRover this is completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants