Design comparison
SolutionDesign
Solution retrospective
Some problems
Having torubles whit the validation of some elements in the form, just find a easy way to do it whitout JS but i want to practice more my DOM manipulation.
Love to get some advice and comments about this project.
Community feedback
- @SalahShadoudPosted over 1 year ago
hey! great work here just wanted to leave u some notes about things i would do differently:
- for the validation of the inputs values, u can use the
pattern
attribute on the HTML inputs to specify the pattern of the accepted values instead of using it in javascript and then on your javascript file u can select all of your inputs and usereportValidity()
function to check if all values are valid, like this:
const inputs = [...formElement.querySelectorAll("input")]; const allValid = inputs.every((input) => input.reportValidity()); if (allValid) { //do something if all inputs have valid values};
- for styling the form container, i recommend u to use the
max-width
to try and match the accurate width of the form container.
Happy Coding <3
Marked as helpful1 - for the validation of the inputs values, u can use the
Please log in to post a comment
Log in with GitHubJoin 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