Angular Reactive Forms - zijianhuang/openapiclientgen GitHub Wiki
"As of Angular 14-16, reactive forms are strictly typed by default.", however, constructing typed FormGroup in TypeScript codes is still a manual process. OpenApiClientGen can generate client API codes that generate FormGroups which include validation codes according to some data constraints of each data types
Mappings
Validations
Constraints | NG Validators |
---|---|
required | required |
minLength | minLength |
maxLength | maxLength |
minimum | min |
maximum | max |
pattern | pattern |
Examples of Generated Codes
- Primary Examples
- More Examples (More than 1000).