Skip to content

Commit

Permalink
add: form validation
Browse files Browse the repository at this point in the history
  • Loading branch information
srini047 committed May 1, 2023
1 parent a18f169 commit a5f19b9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const Form = () => {

emailjs
.sendForm(
"service_p37k27", // Service ID
"template_p37k27", // Template ID
"service_p37k27", // Service ID
"template_p37k27", // Template ID
form.current,
"4x5-6c2l5jd105FhJ" // User ID
)
Expand All @@ -29,11 +29,11 @@ const Form = () => {
return (
<form ref={form} onSubmit={sendEmail}>
<label>Name</label>
<input type="text" name="user_name" />
<input type="text" name="user_name" required="true" />
<label>Email</label>
<input type="email" name="user_email" />
<input type="email" name="user_email" required="true" />
<label>Message</label>
<textarea name="message" />
<textarea name="message" required="true" />
{/* <input type="submit" value="Send" /> */}
<button className="btn">
Submit <AiFillRightCircle size={20} />
Expand Down

0 comments on commit a5f19b9

Please sign in to comment.