why a validation is returning a string?