Q:

Can I make all fields "dirty" on attempted submission?

I have a CSS class that applies to all dirty and invalid fields:
input.ng-dirty.ng-invalid, select.ng-dirty.ng-invalid, textarea.ng-dirty.ng-invalid{
    border: 1px solid red;
}

On submission, however, I would like the red border (and anything else I add too the class) to appear.
Is there a way to make all fields dirty on submission? Or apply a class to the form like "ng-formsubmitted" (or something)?

A:

You could set the form to dirty on submit then use that in your css selector instead of the individual elements.
<button ng-click="formName.$setDirty();doWhatever();">Save</button>

or on your form depending on how you've set things up:
<form name="formName" ng-submit="formName.$setDirty()">

http://docs.angularjs.org/api/ng/type/form.FormController
Then your css selector would be
.ng-dirty .ng-invalid {
    ...
}

