Skip to content

Commit

Permalink
Email subscription form - validation (gaearon#597)
Browse files Browse the repository at this point in the history
Validation is not preset in email subscription form. I tried using empty name and invalid email address, it still accepts. I was thinking it would be better if a front end level validation was there. Just added required attribute in the form inputs.
  • Loading branch information
ankita1010 authored Feb 7, 2020
1 parent 3db92d2 commit 240e762
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class Signup extends React.Component {
color: 'rgb(0, 0, 0)',
fontWeight: 400,
}}
required
/>
</div>
<div className="formkit-field">
Expand All @@ -125,7 +126,7 @@ class Signup extends React.Component {
name="email_address"
aria-label="Your email address"
placeholder="Your email address"
required=""
required
type="email"
style={{
borderColor: 'rgb(227, 227, 227)',
Expand Down

0 comments on commit 240e762

Please sign in to comment.