Skip to content
  • Unlock Pro
  • Log in with GitHub
Profile
OverviewSolutions
19
Comments
1
Ray
@ray-mak

All comments

  • Jackcheal Dang•70
    @jackchealdang
    Submitted over 1 year ago

    Simple JavaScript Validation

    1
    Ray•430
    @ray-mak
    Posted over 1 year ago

    If you want the error icon to show up when the input fields are not properly filled out, you can use the following properties to set the icon in your input element:

    background-image:

    background-repeat:

    background-position:

    I set the initial display to hidden and then used javascript to toggle it depending on if the input fields are filled out.

Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub