Adding a maximum length validtion for strings

Just adding a maximum length validation for strings.