Topic: Check if form is valid in angular

osoverflow pro asked 5 years ago

Hi! I want to know how to check if a form is valid in angular, to disable/enable the submit button if the form is invalid. I'm using the form builder to do some validations and mdbInputValidate directive to validate fields, but I want to know how to verify that all inputs are valid before enabling the submit button.

shofiul free answered 3 years ago

Link Does not work.

Arkadiusz Idzikowski staff commented 3 years ago

The documentation structure slightly changed since then. Please try this one:

Damian Gemza staff answered 5 years ago

Dear osoverflow, In your case, you have to use ReactiveForms to check if the whole form is valid or not. I've prepared instruction which shows how to use default angular validators and our custom validations. There you can find something like  Submit Validation. Implementing this allows you to check if every input in your forms are valid when you click on the button. Please use this doc: If you will need more help, just let me know. Best Regards, Damian

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No