Skip to content

Correction time regex in the add Methods #131

@tiagofaustino

Description

@tiagofaustino

Archive: http://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/additional-methods.js

The regex was this way above:

/^([01][0-9])|(2[0123]):([0-5])([0-9])$/

If you enter "12" for example, it returns true.

I propose this new regex:

/^([0-1][0-9]|[2][0-3])(:([0-5][0-9])){1,2}$/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions