Which standard should we use for Validators? #2
Replies: 5 comments 15 replies
-
IMHO the "Matcher" in libraries udos86/ng-dynamic-forms |
Beta Was this translation helpful? Give feedback.
-
A collection of ideas:
(I can build an utility to avoid boilerplate)
and we provide these on another
so if there's a match, So, basically the matchers are conditional validators right @Yumitoya8569? 😃 ow wow and this will be wired by default in these dynamic-forms! |
Beta Was this translation helpful? Give feedback.
-
This PR #21 implemented Validators and AsyncValidators I will write an article about this soon! |
Beta Was this translation helpful? Give feedback.
-
Conditional validator added via Matcher here: 90554e3 |
Beta Was this translation helpful? Give feedback.
-
Hi, your library is very nice. createMatConfig('ARRAY', {
name: 'products',
factory: { cssClass: 'row' },
params: {
title: 'Products',
subtitle: 'Items to checkout',
initItem: true,
},
controls: [
createMatConfig('INPUT', {
name: 'product',
options: { validators: ['required'] },
factory: { cssClass: 'col-6 col-md-8' },
params: { label: 'Product Name *' },
}),
createMatConfig('INPUT', {
name: 'quantity',
options: { validators: ['required', ['min', 1]] },
factory: { cssClass: 'col-5 col-md-3' },
params: { label: 'Quantity *', type: 'number' },
}),
],
}) |
Beta Was this translation helpful? Give feedback.
-
We've seen some existing stuff at ngx-formly guide > validation
but we'd like to collect ideas and some practices from the community to manage validators and their output messages.
Please share your way to accomplish this on your forms, or thumb up an existing post 😄
Beta Was this translation helpful? Give feedback.
All reactions