Custom element that holds the validation controller instance?
- Dominant language
- TypeScript
- Stars
- 129
- Forks
- 125
- PR merge metrics
- No merged PRs in 30d
Description
Is it possible to create an "`app-form`" custom element that contains the validation controller instance and handles the validation so parent components can use it without knowing about validation?
I'm considering something like:
`parent.vm.html`
```
First Name
```
`input.element.html`
```
```
`sample.model.ts`
```
export class SampleModel {
firstName: string;
}
ValidationRules.ensure((m: SampleModel) => m.firstName)
.required()
.on(SampleModel);
```
Contributor guide
Research direction
Start by reviewing the parent.vm.html, input.element.html, and sample.model.ts examples to understand the proposed component boundaries and validation bindings. Determine whether the issue calls for a documented pattern or implementation; done should clearly define how app-form owns validation while parent components remain unaware of the controller.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100