model view controller - custom error in Remote validation in mvc3 -


i've remote validation(with remote attribute) , want display user different error message according validation logic. how can so?

just set errormessage attribute:

[remote("username", "registration", errormessage = "user name taken!")] 

edit:

for idea on how do multiple remote validations on same property, check out interesting post , self-answer @fabian:

passing errormessage clientside validation


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -