This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added required input for single file attachment #78
Added required input for single file attachment #78
Changes from 2 commits
f33ccc7
0b602bd
998f60e
ba55a43
ad33b41
89ea150
0e770c0
016e972
6b63e0c
f81d851
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little confused by "to be valid." What is considered valid? The single file attachment? Or the form that it is included on? I mean, is the validation specific to the single file attachment? Or is it specific to a form, to indicate that users must attach a file before they can complete the form? The latter makes more sense to me, but the current wording seems like the validation is specific to the input. Also, in #77, we explain the impact of setting
required
totrue
. Is there any reason not to include that information in the description? Assuming my understanding of all of this is correct, what do you think of fleshing out this description to:"Indicates whether the input is required for form validation. When you set this property to
true
, the component addsaria-required
andrequired
attributes to theinput
element, and both template-driven forms and reactive forms show an invalid state until theinput
element is complete. This property accepts aboolean
value."There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's all accurate, although I'm not sure we have to point out that both reactive and template-driven forms are supported. Isn't that just the assumption that we would support them both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. The description in #77 called out both reactive and template-driven forms, and I included it here without fully thinking it through. Since we don't really need to call that out, we can tighten up to:
"Indicates whether the input is required for form validation. When you set this property to true, the component adds
aria-required
andrequired
attributes to theinput
element so that forms display an invalid state until theinput
element is complete. This property accepts aboolean
value."There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.