Hey guys i really need help i am currently working on the survey form project i need help with writing some code that will give a validation error when the user enters a number that is below the min or higher than the max
this is what i have so far…
<doctype! html>
<html>
<style>
#title{
text-align: center;
font-style: sans-serif;
}
body{
background: #1e90ff;
}
#description{
text-align: center;
}
div{
background:#fff;
margin-left: 40px;
margin-right: 40px;
}
#survey-form{
text-align: center;
padding-bottom: 20px;
}
#name{
margin-left: 20px;
margin-bottom: 20px;
}
#email{
margin-left: 20px;
margin-bottom: 20px;
}
#number{
margin-left: 20px;
margin-right: 20px;
}
</style>
<body>
<h1 id="title">Survey Form</h1>
<div>
<p id="description">Let us know how we can improve freeCodeCamp</p>
<form id="survey-form">
<label>
*Name: <input type="text" name="Name" placeholder="Enter your Name" id="name" required>
</label> <br>
<label>
*Email: <input type="text" name="email" placeholder="Enter your Email" id="email" required>
</label><br>
<label>
*Age: <input type="number" name="age" placeholder="Age" id="number" required min="1" max="125">
</label>
<label>
Which option best describes your current role?
</label>
</form>
</div>
</body>
</html>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
.
Link to the challenge: