The validation errors are displayed before the user actually clicks the save button. In my save method I have this if statment that stops the form being submitted,
function save() {
if ($scope.campaignForm.$invalid) {
console.log("Validation working now how to apply the ccss class?")
return false;
}
//Save logic here
how do I apply the CSS class only when the form is being posted?
How to reuse Umbraco's Validation in Custom Section
I have a custom section and I'm trying to get validation working exactly the same way it works in Umbraco's content section.
If i Include the show-validation css class in my like this:
The validation errors are displayed before the user actually clicks the save button. In my save method I have this if statment that stops the form being submitted,
how do I apply the CSS class only when the form is being posted?
I tried removing the class and doing this....
Still no joy........
This works, but is this really how it should be done? becuase then I have to write code to remove it...
hmm works but dosn't feel right
is working on a reply...