Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message when only 1 child is expected #276

Open
NiedziolkaMichal opened this issue Oct 31, 2022 · 0 comments
Open

Message when only 1 child is expected #276

NiedziolkaMichal opened this issue Oct 31, 2022 · 0 comments

Comments

@NiedziolkaMichal
Copy link

When schema expects a single child from a range of options, validated element with no children throws error saying that "one or more" children are acceptable.

For example this schema expects test element to have either inner1 or inner2 child:

element test { (element inner1 { text } | element inner2 { text }) }

When element test is created with no child inside, following message is used:

Element test is missing a required instance of one or more of the following child elements: inner1, inner2.

More appropriate message would be:

Element test is missing a required instance of one of the following child elements: inner1, inner2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant