Changed validation rules with string length to use str class