Skip to content
This repository has been archived by the owner on Nov 24, 2018. It is now read-only.

Commit

Permalink
fix(digitsValidator): Use combination of Number constructor and toStr…
Browse files Browse the repository at this point in the history
…ing() to split number to integer and fraction parts

- fixes a bug when the current locale uses ',' as decimal separator
  • Loading branch information
Philipp Denzler committed Dec 2, 2014
1 parent 81245b0 commit f359fe8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/validators/digitsValidator.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe('valdrDigitsValidator', function () {
it('should validate correctly with fraction > 4', function() {
constraint.fraction = 4;
expect(digitsValidator.validate(1000.00001, constraint)).toBe(false);
expect(digitsValidator.validate(1000.0001, constraint)).toBe(true)
expect(digitsValidator.validate(1000.0001, constraint)).toBe(true);
});

it('should not choke on integer:1 conditions', function () {
Expand Down

0 comments on commit f359fe8

Please sign in to comment.