// TESTS: Combination of model with lazy-metadata + Validation import { Validators } from '@angular/forms'; const model = { field: '', fieldTwo: '', nestedGroup: { fieldA: '', validationTest: '', fieldB: 'Value 2', fieldC: 'Maybe', anotherNestedGroup: { fieldE: '', fieldF: 555, yetAnotherNestedGroup: { fieldH: true, OooOooAhhAhh: false } }, z: 'THE END' } }; const meta = { nestedGroup: { meta: { validationTest: { validators: [ Validators.required, Validators.minLength(4) ], // perhaps have some standard messages for standard failures in the Object.prototype ?? valFailureMessages: { 'required': 'This field is required', 'minlength': 'Please type something longer' } }, fieldB: { type: 'checkbutton' }, fieldC: { label: 'Property Three', type: 'radio', options: ['Yes', 'No', 'Maybe'], horizontal: 1 }, anotherNestedGroup: { meta: { fieldE: { type: 'radio', 'label': 'Does it work yet?', validators: Validators.required }, fieldF: { type: 'datepicker' } } } } } }; export { model, meta };