I need to create a validation directive for showing all input errors for each input automatically. This validation directive should show all errors at current moment and list of
all input errors for each input automatically
Personally, I see more cons than pros from that phrase.
What if your next developer wants to change error messages to, Hey, your input is too short
.
Do you want him to abandon your general error messages? Or, change it in your javascript?
What if your next developer add his custom error messages using ng-show
.
Then, you will have two error messages meaning the same.
Then, will you not allow to have that? or, your general directive error message should be hidden? Or, apply that custom error message into general error message? If so, then how? See, it gets complex.
If you are not sure about the above I mentioned, I would recommend not to create a general error messages.