@OneLine validator
Most string fields in the model are not multi-line strings, but we now accept input such as Foo\nbar
.
Add a validator @OneLine
that ensures the String
does not contain line break characters. It should be a fast implementation using:
isValid(string) -> string.indexOf('\n') == -1 && string.indexOf('\r') == -1
Are there other characters we need to check here?
Add the validation to the SysUser.username
field for testing.