Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Intro component with a signup form

@jubairhaider

Desktop design screenshot for the Intro component with sign-up form coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Can anyone help me with the form validation part, and how can I do this without writing any javascript?

Community feedback

Cường 845

@docuong0912

Posted

Hi, i think you've already done that by using "required" in <input> element,so what exactly you want to do with the validate part?

You can use min, max, maxlength,minlength for length validation.

By the way, good work, your solution looks really good, man

1

@AgataLiberska

Posted

@docuong0912 I think this design has some error messages displayed if the inputs are not validated, I don't think this can be done without some js? Maybe with Bootstrap, then the javascript part is all done for you and it's just the html and css that would need some tweaking to match the design.

1
Cường 845

@docuong0912

Posted

@AgataLiberska that's strange, i thought that whenever i use the "required" attribute in the "input" element , if the input is blank or wrong type, the error warning is raised automatically, sir?

1

@AgataLiberska

Posted

@docuong0912 Sorry I was replying to your comment without looking at the solution, which does actually use js. But yes you will get an error message with native HTML validation but it will be the default browser message and you have little control over what it will look like. If you want a custom style and error message, and if you want it to look the same for all browsers, it needs java script.

Here is a comparison

(Also, please don't call me sir I am a woman)

2
Cường 845

@docuong0912

Posted

@AgataLiberska My apologies :)

0

@AgataLiberska

Posted

@docuong0912 no offence taken :)

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord