Skip to content

Commit ea8884b

Browse files
committed
chore: clean up form validation and placeholders
1 parent 22573d7 commit ea8884b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/components/Info/Form.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,15 @@ export default ({ onSubmit, city }) => {
3737
}}
3838
>
3939
<p>
40-
If you are not conformable showing your photo and link please put `QueerJS` in the Github
41-
Username input
40+
If you're not comfortable showing your photo and link please put `QueerJS` in the `Github
41+
Username` input field.
4242
</p>
4343
<label htmlFor="name">
44-
Name
44+
Your Name
4545
<input
4646
required
4747
id="name"
48+
placeholder="Name"
4849
type="text"
4950
minLength="2"
5051
value={name}
@@ -57,8 +58,10 @@ export default ({ onSubmit, city }) => {
5758
required
5859
id="gh"
5960
type="text"
61+
placeholder="QueerJS"
6062
pattern="[A-Za-z0-9-]{1,30}"
6163
value={gh}
64+
onInvalid={e => e.target.setCustomValidity(`Your username, e.g. 'QueerJS' for 'https://github.com/queerjs'`)}
6265
onChange={e => setGH(e.target.value.trim())}
6366
/>
6467
</label>

0 commit comments

Comments
 (0)