Fix alphaNumeric validation

Newline at the end of string should be detected.