Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/full-stack-web-developer-and-designer/angular_formvalidation
AngularJS FormValidation for inputs using attributes ng-required and ng-minlength.
https://github.com/full-stack-web-developer-and-designer/angular_formvalidation
angular angularjs form-validation forms mirnesglamocic
Last synced: about 19 hours ago
JSON representation
AngularJS FormValidation for inputs using attributes ng-required and ng-minlength.
- Host: GitHub
- URL: https://github.com/full-stack-web-developer-and-designer/angular_formvalidation
- Owner: full-stack-web-developer-and-designer
- License: mit
- Created: 2021-11-12T04:50:51.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-17T00:51:33.000Z (almost 3 years ago)
- Last Synced: 2024-11-12T23:26:40.126Z (2 months ago)
- Topics: angular, angularjs, form-validation, forms, mirnesglamocic
- Language: CSS
- Homepage: https://full-stack-web-developer-and-designer.github.io/Angular_FormValidation/
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Angular Form Validation
This repository contain responsive form with **AngularJS** validation.
So, at the `section` we add `ng-app` that initialize Angular application. In the form we add attribute _novalidate_ for don't use browser validation.
So, we have four different inputs fields and on each input we create `ng-model` and by doing this we are created variables that are accessible inside `ng-app`
Also, for all inputs we add Angular attribute `ng-required` that is equal required in HTML, and for password we add attribute `ng-minlength` that is equal minlength in HTML.
With Angular properties `$valid` and `$touched` we show custom error message for each input if input isn't valid using Angular directive `ng-show`.
## How do you know if it worked?
* If you have done everything correctly, your inputs on submit will change border-color to green and display message *Welcome* + *firstname* + *lastname* which you insert inside inputs.
* Otherwise, your inputs will change border-color to red with message bellow input where input isn't correct.
* Also, using `ng-valid` and `css` background color of button will be gray until we type all the fields properly.[PREVIEW](https://full-stack-web-developer-and-designer.github.io/Angular_FormValidation/)