I have successfully created a form using control forms.
idAnnuaire: new FormControl('',[Validators.minLength(6),Validators.maxLength(6)]),
However, I am facing an issue where when the field is left empty,
{{form.controls.idAnnuaire.valid }}
is showing as true
instead of false
(expected behavior).
I prefer not to set the control form as required because users should be able to submit the form even if they haven't filled in the idAnnuaire
input, as long as other fields are completed.