0
check code on my profile in html when I am making I form .then I need in email section when I don't put @ it's show's me error
Html form
10 Answers
0
I just now mark it
Your problem can be solved just by changing type:button; to type:submit;
Check it.keep all same
+ 1
For this you can use pattern attribute of input or can use js to show alert
0
If you have input type email
It's input must end with @----.com
0
Will you pls tell me In detail that how can I solve my problem ?
0
I am saying that when I am writing in my email section anything without @ then it's doesn't show me that you have to put @ , I want it that it shows me that you didn't put @ in your email
0
If you want to put any random text in your email inputfeild just change the type:email ; to type:text;
0
I didn't want to put any Random text !
I just want when I forgot to put @ it's will show me an error !!
0
when the user click on sign in button, initiate a function and check if the email entered contains @ or not ,I am using regex to do so
<input type="button" value="sign in " onclick="check()">
</form>
<script>
function check(){
var el=document.querySelector("#email");
var match=el.value.match(/@/);
if(!match){
console.log("enter right email");
}
};
</script>
0
Okay dude
Thanks đ
0
thanks Divya Mohan đđ
it worked đ€đ€