-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show default or custom success message only if directive is available in the element. #248
base: master
Are you sure you want to change the base?
Conversation
Thanks for the PR @jeevasusej can you share one use case example what this function actually does? |
Now the directive will show default success message for all the input element which is validated. The following scenarios will be done
|
This is a nice trick, but I suggest people define the message in rule, not set the message in the directive what you can do? Doc. is this useful in your case? |
Sorry. This will not be helpful.
The above option will hide the message globally. But in some scenarios like follow
In the above case, I need to get the $validationProvider provider and change based on the page requirement. So that I have added a condition for this.
|
Will this idea give more option for the user? |
I'm sorry that. again
There is one more trick : I will bump an issue about allowing specific Form to show/hide Success/Error message instead of globally. #249 what do you see? |
For this while I am code, each time, I need to send the empty span tags. So this makes me to add more code.
If we do like this, then each time I need to set the show/hide property for each form in all the pages. Since I am too lazy, If I forget the directive (or attribute that is required-success-message or number-success-message) to mention in the element, then the success message won't be displayed. So
Will this valuable? |
Do you prefer
instead of
? |
Sorry, I cannot understand. |
you set the validation directive message (e.g. |
For error validation directive message, there is no problem. But, If I don't need, why do need to mention as directive in the element or why do I need to have the option for each page? |
unfortunately, there is no better solution in the current version. The creation of the validation directive message is just a quick hand to overwrite the global message. The solution I would suggest now
I have no idea which solution will be the best to specific which message to show and hide. |
Hi, I create an issue about it. #250 Feel free to add some points on it. |
Thanks for the info and thanks for your patience towards me.
Please see the following code.
The above is the code using existing code. I need to set the empty string in that. After adding the following code in the validFunc
My Code will be
If I want to add default success message,
else
|
Thank you for describing the issue, I will think about it and give the solution in #250 You can now fork the branch and edit the |
Added a condition that Show default or custom success message only if directive is available in the element.
The following code is added in the validFunc