Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * to use this script replace "form.$valid" and "form.$error" with the proper model
- * name in the html snippet below
- * IE <my_form_model_name>.$error and <my_form_model_name>.$valid
- * and then place the html snippet inside of the form
- * @packge @angulaJs
- * @author RapidMod.io
- */
- ?>
- <ul ng-if="!form.$valid">
- <li ng-repeat="(key, errors) in form.$error track by $index"> <strong>{{ key }}</strong> errors
- <ul>
- <li ng-repeat="e in errors">{{ e.$name }} has an error: <strong>{{ key }}</strong>.</li>
- </ul>
- </li>
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment