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

Make required fields in dates and address fragments configurable #558

Merged
merged 6 commits into from
Jun 12, 2024

Conversation

spokenbird
Copy link
Contributor

No description provided.

@@ -3,6 +3,7 @@
th:with="
hasLabel=${!#strings.isEmpty(label)},
hasAriaLabel=${!#strings.isEmpty(ariaLabel)},
requireDateFields=${requireDateFields ?: false},
Copy link
Contributor

Choose a reason for hiding this comment

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

Line 11 has a "required" variable - is that doing the same thing under a different name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, just me totally not realizing I had already done the thing 😅

README.md Outdated
@@ -669,6 +669,41 @@ Here is an example of using it with the `screenWithOneInput` fragment:

Note that passing `required=true` here will append the red `(required)` to the label.

#### Special situation for requiring address fields

Sometimes you may want to apply custom validations to address fields through actions that effectively
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be good to add a pointer to the action for custom validations, so that they fully understand what this is referring to. Maybe capitalize "Actions" and have it be a link to "https://github.com/codeforamerica/form-flow?tab=readme-ov-file#actions"? Same for the date fields section below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@bseeger bseeger left a comment

Choose a reason for hiding this comment

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

LGTM

@spokenbird spokenbird merged commit bb3325e into main Jun 12, 2024
5 checks passed
@spokenbird spokenbird deleted the configurable-required-for-dates-and-address branch June 12, 2024 18:57
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

Successfully merging this pull request may close these issues.

2 participants