Skip to content

Instantly share code, notes, and snippets.

@devbyray
Created December 31, 2021 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devbyray/f9a6bc4580cd5e663ab4d1653a90c734 to your computer and use it in GitHub Desktop.
Save devbyray/f9a6bc4580cd5e663ab4d1653a90c734 to your computer and use it in GitHub Desktop.
fields: FormlyFieldConfig[] = [
{
key: 'postal',
type: 'input',
parsers: [(value: string) => value?.toUpperCase()],
templateOptions: {
label: 'Postal code',
type: 'text',
appearance: 'outline',
},
expressionProperties: {
'model.postal': 'model.postal',
},
modelOptions: {
updateOn: 'blur',
},
},
{
key: 'initials',
type: 'input',
parsers: [(value: string) => this.formatInitials(value)],
templateOptions: {
label: 'Initials',
type: 'text',
appearance: 'outline',
},
expressionProperties: {
'model.initials': 'model.initials',
},
modelOptions: {
updateOn: 'blur',
},
},
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment