@youssefouba
Posted
hi! It looks like you're facing two issues:
-first, change your style link in <head> from :
<link rel="stylesheet" href="/index.css">
to.
<link rel="stylesheet" href="index.css">
no need to add / because the HTML file and CSS file are in the same folder
the same issue in javascript change src to just "index.js"
-for the validation problem :
-
you are using "email" type in your input <input type=š"email" autocomplete="off" placeholder="Your Email Address" id="email" name="email" required=""> so The input value is automatically validated to ensure it is a properly formatted e-mail address.
-
to do custom validation change the type to text and do the work in javascript.
@Reno08-code
Posted
@youssefouba hi thank you. I changed the type to text ,and when I looked at the console ,the new class "error" and the p element containing the warning message were added ,however the message just didn't show on the web.....
@youssefouba
Posted
@Reno08-code hi! It looks like the position: absolute; style is causing the issue with the error message not being visible. Removing the position: absolute; style should fix the problem and allow the error message to be displayed correctly. š form .error_text { position: absolute;}
@Reno08-code
Posted
@youssefouba hi yes your are correct! I changed it and now I can see the message:)thank you
@Reno08-code
Posted
@youssefouba hi yes your are correct! I changed it and now I can see the message:)thank you