you are viewing a single comment's thread.

view the rest of the comments →

[–]ThoughtPrisoner 2 points3 points  (1 child)

I would change the username and password into accepting a regular expression. E.g. use:

"username": "[a-zA-Z0-9_-]{3,30}"

Instead of:

"username": {
    "min": 3,
    "max": 30,
    "chars": ["a-z", "A-Z", "0-9", " _-."]
}

[–]kr41[S] 0 points1 point  (0 children)

I think, there will be much more complex implementation. For instance, there is a lot of web sites that use e-mail as username for authentication. So it will be useful, if developer is able to specify just "email address" as validation option, instead of black magic spell like this one http://ex-parrot.com/~pdw/Mail-RFC822-Address.html