Last active
August 29, 2015 14:16
-
-
Save gorork/149b62aeadc7a43d8233 to your computer and use it in GitHub Desktop.
User-friendly validation AngularJS directive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
AngularJS directive | |
type: AE | |
1. pass a field name (e.g. "formName.fieldName") into the "messages-for" attribute; | |
2. pass a scope expression that returns "true" when users tries to submit the given form | |
--> | |
<!-- Validate Messages directive starts --> | |
<div validate-messages messages-for="siteForm.siteName" submitted="submitted"></div> | |
<!-- Validate Messages directive ends --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment