Test validator to string