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

Comparison checks do not work with custom seperator and delimiter #559

Closed
mickiii opened this issue Jun 23, 2013 · 2 comments
Closed

Comparison checks do not work with custom seperator and delimiter #559

mickiii opened this issue Jun 23, 2013 · 2 comments

Comments

@mickiii
Copy link

mickiii commented Jun 23, 2013

Hi,

I am using the delocalize gem, which works fine when checking numericality and setting ClientSideValidations::Config.number_format_with_locale = true, but when performing subsequent checks, i.e. less_than_or_equal_to, only the input val gets converted according to the local settings, but the check_value does not, which causes the validation to fail.

I have copied the assets to my local asset folder and made a simple workaround:
check_value = check_value.replace(new RegExp("" + ClientSideValidations.number_format.delimiter, 'g'), "").replace(new RegExp("" + ClientSideValidations.number_format.separator, 'g'), ".");

@maintux
Copy link
Collaborator

maintux commented Aug 9, 2013

Thanks! I'll fix it asap 👍

@ghost ghost assigned maintux Aug 9, 2013
@tagliala
Copy link
Contributor

Hi,

I'm shutting down old issues.

If it still is an issue, feel free to open a new one but make sure it meets our Contributing Guidelines

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

No branches or pull requests

3 participants