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

min and max validators should ignore date values instead of trying to typecast them into numbers and getting NaN, causing validation to fail #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Feb 28, 2017

  1. Fix: According to MDN at https://developer.mozilla.org/en-US/docs/Web…

    …/HTML/Element/input, min and max can take a date-time value.
    
    When that happens, these two validators ends up trying to convert these values into a number, which results in NaN, which causes the validation to fail.
    
    To fix this issue, if the min or max value isNaN and is a date, then simply return null. The validtion of these fields are handled by minDate and maxDate
    Shahmir Noorani authored and Shahmir Noorani committed Feb 28, 2017
    Configuration menu
    Copy the full SHA
    e5df9d4 View commit details
    Browse the repository at this point in the history