đź“ť JSON powered / Dynamic forms for Angular
MIT License
Bot releases are hidden (Show)
Published by aitboudad almost 4 years ago
Published by aitboudad almost 4 years ago
Published by aitboudad about 4 years ago
Published by aitboudad about 4 years ago
To enable this feature pass true
to lazyRender
options:
FormlyModule.forRoot({
+ extras: {
+ lazyRender: true,
+ },
}),
resetFieldOnHide
that detach the hidden field value from the main model.To enable this feature pass true
to resetFieldOnHide
options:
FormlyModule.forRoot({
+ extras: {
+ resetFieldOnHide: true,
+ },
}),
export function customValidator() {
...
return {
passwordValidator: {
errorPath: 'password',
message: 'Please choose a stronger password!',
},
usernameValidator: {
errorPath: 'username',
message: 'This username is already taken!',
},
};
}
Published by aitboudad over 4 years ago
Published by aitboudad over 4 years ago
Published by aitboudad over 4 years ago
Published by aitboudad over 4 years ago
Published by aitboudad over 4 years ago
Observable for validation message (Example)
The validation message can return an observable value which is useful for an i18n app where the messages are loaded asynchronously.
Simplify passing extra parameters to validation (Example)
validation: [
{ name: 'date-future', options: { days: 5 } }
]
Allow onInit/afterView/afterContent to return observables (Example)
{
hooks: {
onInit: (field) => {
// subscription and unsubscribe is handled by formly
return field.formControl.valueChanges
.pipe(tap(value => console.warn(value))),
;
}
}
}
Take account of defined validators in a fieldGroup
with empty key (Example)
Published by aitboudad over 4 years ago
Published by aitboudad over 4 years ago