Implements integer validation function
Implements maxLength validation function