Questions tagged [angular-validation]

Angular 2+ validation patterns, syntax and properties. Validation of forms, controls, models using various Angular 2+ validation directives.

Angular's built-in form properties are there to help us with client-side validation.

You can either:

425 questions
-1
votes
1 answer

ControlValueAccessor know when required is set on reactive form

I have a custom control that implements ControlValueAccessor and is only used with a reactive form. How do I tell, inside the custom control, when the required validator has been assigned or removed? I don't want to just create an @Input for a…
Gargoyle
  • 9,590
  • 16
  • 80
  • 145
-1
votes
1 answer

Angular form required/pattern validation is not working

I have a simple form which contains one textbox. I added required and pattern validation on this textbox. It's added red borer on the textbox when textbox is empty or not matching pattern but not displaying error message. I have created a sample…
alok_dida
  • 1,723
  • 2
  • 17
  • 36
-1
votes
2 answers

Checkbox group, submit button only if at least one checkbox is checked Angular 2

I have a checkbox group with 3 items. I created it with Angular 5.0.5 and Clarity vm. I want my function to check if at least one of the checkboxes is checked and THEN go at the next page, which is a wizard. Until now the wizard opens without…
Init
  • 15
  • 1
  • 4
-1
votes
2 answers

Triggering form validation programmatically in angular-js

I am using a custom directive to submit a form programmatically however no form validation is applied before submitting the form. I have called $setDirty() on the form field and $setSubmitted() on the form but the form is still submitted even if the…
-2
votes
1 answer

Angular 8 Reactive Form Validators

I have a FormControl in my Angular 8 app like this: this.closingOrderFormGroup = this._fb.group({ final_price: new FormControl('', [ Validators.required ] ), }); I tried to add/remove Validators.required dynamically based on some radio button…
1 2 3
28
29