Skip to content

Angular Reactive Forms

fonlow edited this page Jan 13, 2024 · 3 revisions

"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