Skip to content

Commit d6f9c79

Browse files
authored
Update README.md
1 parent d9382b0 commit d6f9c79

File tree

1 file changed

+29
-27
lines changed

1 file changed

+29
-27
lines changed

README.md

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
1-
# Project8
2-
3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.8.
4-
5-
## Development server
6-
7-
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8-
9-
## Code scaffolding
10-
11-
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12-
13-
## Build
14-
15-
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
16-
17-
## Running unit tests
18-
19-
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20-
21-
## Running end-to-end tests
22-
23-
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
24-
25-
## Further help
26-
27-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
1+
# Validation-Directive-in-Angular-6
2+
3+
## Mockdata
4+
validationerrors.json in assets folder
5+
6+
```
7+
{
8+
"validationErrors": {
9+
"firstName-required" : "Firstname is a required field",
10+
"firstName-minlength" : "Firstname must have 2 characters",
11+
"firstName-maxlength" : "Firstname can have maximum 30 characters",
12+
13+
"lastName-required" : "Lastname is a required field",
14+
"lastName-minlength" : "Lastname must have 2 characters",
15+
"lastName-maxlength" : "Lastname can have maximum 30 characters",
16+
17+
"emailId-required": "Email is a required field",
18+
"emailId-email": "Email is not in valid format",
19+
"emailId-minlength" : "Email must have 6 characters",
20+
21+
"mobile-required" : "Mobile is a required field",
22+
"mobile-minlength" : "Mobile must have 10 characters",
23+
24+
"password-required" : "Password is a required field",
25+
"password-minlength" : "Password must have 6 characters",
26+
"password-maxlength" : "Password can have maximum 20 characters"
27+
}
28+
}
29+
```

0 commit comments

Comments
 (0)