[Angular 6 + Spring Boot] #12 Angular Form Validation

preview_player
Показать описание
Create Java web applications with Angular 6 and Spring Boot

In this episode we are going to cover client side form validation in Angular. We are going to start from the feedback template driven form created in the previous episode and add input validation for all the fields. After watching this episode you will:
- be able to add validation to any input filed
- send data to the server only when the entire form is valid
- write useful validation messages for your users
- understand the Angular "validation syntax"

Source code

_______

Check out the latest software programming articles on my blog, where you will find lots of software development tutorials that will sharpen your programming skills

_______

Say hi on social

Рекомендации по теме
Комментарии
Автор

Hai Dan,
I just catched up to this episode and it's just awesome you posted another series to help others! To me it's very useful, because I like to write my own Angular app for my Spring Boot app.

I just like to note that it is also possible to run the note-ng-app using IntelliJ Run Configuration instead of using the command line. Steps to do so are:
- Create a new run configuration of type npm
- Select the package.json (if not already selected)
- Command: start
- Make sure Node Interpreter is selected
- Click OK and a new run configuration is added
- Just press to green arrow to fire-up the application :)

note: modify the line "start": "ng serve" to "start": "ng serve --live-reload=false" in package.json to disable live-reload if you don't want to reload after code changes.

Thanks again for your effort and I am looking forward to the next episode of this course and other courses that may follow 😃.

raymondmouthaan
Автор

Thanks for the cool tutorials :D How do you get the energy and motivation ?

adrianweb-xyz
Автор

how validation from backend and return result to frontend to enable field validation?

LeHoang-cbng
Автор

Why do you think is the IDE marks an error in the errors validations?

name.errors?.required
email.errors?.required
email.errors?.email
feedback.errors?.required
feedback.errors?.minlength

It works and everything is fine... but it marks me this as an error saying this:
"Identifier 'required' is not defined. '__type' does not contain such a member"
or
"Identifier 'minlength' is not defined. '__type' does not contain such a member"

Any ideas??

Thanks bro, great tutorials!!

MarioAbundis