Added maxlength validator

Added the tests @sujesharukil for the maxlength validator.