Further Reading 2) Call a function on on-change of a text box or on button click to validate the number entered by a user matches your expression in But it affects the validation. 1. Consider the following template-driven form. Angular calls these functions whenever the value of the control changes. See you again. Must Read: ValueChanges in Angular. If the checkbox is set to false (unchecked) then we clear the required validator on the dropdown and reset it to a pristine state. Therefore just like model-driven forms we need to attach a validator function to the underlying model form control. minlength Validation Angular provides MinLengthValidator directive to validate minimum required length for input such as text input. In the form example above, Angular is tracking the validity state of the whole form, using it to enable/disable the submit button. The Reactive approach removes the core validation logic from the template and hence makes the template code quite clean. If we are trying to use the Angular app to create form, we require to import FormsModule. in Angular-9 if you want to disable/enable on button click here is a simple solution if you are using reactive forms.. define a function in component.ts file //enable example you can use the same approach for disable with .disable() toggleEnable() { this.yourFormName.controls.formFieldName.enable(); console.log("Clicked") } In angular we have two different approaches that is template driven and reactive forms both of them have their own advantage and disadvantage and specific purpose when to use which one. You can also use the Form Validation in following posts: Angular File upload example with progress bar Angular CRUD Application example with Web API Angular JWT Authentication example with Web Api. Template driven forms. Validations in Template-driven forms are provided by the Validation directives. We need to provide name attribute in element with NgForm,