Description of the bug
When an OrganisationLookup component is bound to a data model field that is marked as required (Påkrevd), the required validation is not enforced. The user can submit the form without filling in the organisation number.
Steps To Reproduce
Steps to reproduce
- In the data model, mark EngasjertVirksomhet.Organisasjonsnummer as required (Påkrevd toggled on).
- In a RepeatingGroup, add an OrganisationLookup component bound to EngasjerteVirksomheter.Organisasjonsnummer:
// Example
{
"id": "EngasjerteVirksomheterOrganisationLookup",
"type": "OrganisationLookup",
"dataModelBindings": {
"organisation_lookup_orgnr": {
"field": "EngasjerteVirksomheter.Organisasjonsnummer",
"dataType": "skjema"
}
}
}
- The RepeatingGroup has "validateOnSaveRow": ["Required"] configured.
- Add a row to the repeating group and attempt to save/submit without entering an organisation number.
Expected behavior
Validation should prevent the user from saving the row and/or submitting the form, showing a required-field error on the OrganisationLookup component.
Actual behavior
No required validation error is shown. The user can save the row and submit the form with Organisasjonsnummer empty.
Additional Information
Repository: https://altinn.studio/repos/dat/forhandsmelding
Component: OrganisationLookup (altinn-app-frontend)
Description of the bug
When an OrganisationLookup component is bound to a data model field that is marked as required (Påkrevd), the required validation is not enforced. The user can submit the form without filling in the organisation number.
Steps To Reproduce
Steps to reproduce
Expected behavior
Validation should prevent the user from saving the row and/or submitting the form, showing a required-field error on the OrganisationLookup component.
Actual behavior
No required validation error is shown. The user can save the row and submit the form with Organisasjonsnummer empty.
Additional Information
Repository: https://altinn.studio/repos/dat/forhandsmelding
Component: OrganisationLookup (altinn-app-frontend)