Asp Customvalidator Change Error Message
Contents |
here for a quick overview of the site Help Center Detailed answers to
Asp Customvalidator Example
any questions you might have Meta Discuss the workings and asp customvalidator clientvalidationfunction policies of this site About Us Learn more about Stack Overflow the company Business Learn asp customvalidator javascript more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community
Asp Net Customvalidator
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Dynamic error message for custom validator clientside up vote 14 down vote favorite 1 I am using a custom validator to call a javascript function for validation.
Change Custom Validator Error Message Javascript
My problem is that I need to be able to change the error message dynamically. Here is the code:
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow asp.net custom validator change error message server side the company Business Learn more about hiring developers or posting ads with us Stack
Set Validation Error Message Javascript
Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of javascript form validation error message 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Custom validator error text through javascript? up vote 0 down vote favorite I want to set ASP.net custom http://stackoverflow.com/questions/5394861/dynamic-error-message-for-custom-validator-clientside validator error parameter text through client side javascript. How can access it via sender, args parameters in my function? javascript asp.net asp.net-2.0 share|improve this question asked Oct 25 '10 at 6:52 Zo Has 5,0201655123 See also stackoverflow.com/questions/1230281/… –Dexter Oct 25 '10 at 7:20 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote accepted All you need to do is define the callback method in the http://stackoverflow.com/questions/4012387/custom-validator-error-text-through-javascript ClientValidationFunction property of the CustomValidator definition:
here for a quick overview of the site Help Center Detailed answers to any http://stackoverflow.com/questions/15220797/change-customvalidator-message-dynamically-in-clientside questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more http://forums.asp.net/t/349096.aspx?Display+a+dynamic+message+with+customvalidator+using+javascript about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack error message Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up change customvalidator message dynamically in clientside up vote 0 down vote favorite I wanna change customvalidator message dynamically in clientside by ClientValidationFunction. In java script I have : function change error message valnationalid(source, arguments) { if (arguments.Value == ""){ source.errormessage = "custom message here"; arguments.IsValid = false; } else if (arguments.Value == "Something else"){ source.errormessage = "another custom message here"; arguments.IsValid = false; } } and in body: