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

Update errorMessage option documentation with falsy value behaviour #1748

Merged
merged 1 commit into from
Feb 26, 2020

Conversation

m-green
Copy link
Contributor

@m-green m-green commented Feb 25, 2020

Updates the description of the errorMessage option (in all the component pages it appears) so that it's clearer that a falsy value will be ignored.

Please check if factually correct.

Copy link
Contributor

@NickColley NickColley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Epic nice work

@NickColley NickColley changed the title Update `errorMessage' option documentation with falsy value behaviour Update errorMessage option documentation with falsy value behaviour Feb 25, 2020
@hannalaakso
Copy link
Member

Looks great! Should we have an example of how to do this eg.

{% if error %}
  {% set errorMessage = { text: "error!" } %}
{% endif %}
...
{{ govukDateInput({
  errorMessage: errorMessage,
}) }}

I'm not sure if it's immediately clear how you should do this without an example.

What do you think @edwardhorsford?

@edwardhorsford
Copy link
Contributor

@m-green thanks for adding.

@hannalaakso I'm tempted to think the description added is the most important part - as this is more relevant to developers implementing.

If you ever get to doing full worked pages, it might be helpful though.

Copy link
Member

@hannalaakso hannalaakso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@m-green m-green merged commit 894d7ec into master Feb 26, 2020
@m-green m-green deleted the clarify-falsy-errormessage-values branch February 26, 2020 11:35
@hannalaakso hannalaakso added this to the v3.6.0 milestone Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document behaviour of null errorMessage attribute
7 participants