Skip to content

ekfuhrmann/stimulus-training

Repository files navigation

Stimulus Training Example

👀 Description

This project is intended as an exercise project to get familiar with using Stimulus. The project is built within an Astro framework, though the html and js written here would be similar to most other frameworks.

🎉 Getting Started

  • The DOM markup for the page can be found at src/pages/index.astro
  • The Stimulus Controller scaffolding and comments can be found at src/scripts/controllers/password-validation_controller.js
  • Reference the Stimulus Docs as necessary or view a completed solution in the solution branch of this project.

✅ Objective

Using Stimulus, add the following form validation:

  • Validate the length of the password field (8-32 characters)
  • Validate that the password has at least 1 uppercase character
  • Validate that the password has at least 1 number
  • Validate that the password has at least 1 special character
  • Validate that the password and password confirmation fields match when filled
  • The form submit button should be disabled until all fields validate.

pw

🧞 Commands

All commands are run from the root of the project, from a terminal:

Command Action
npm install Installs dependencies
npm run dev Starts local dev server at localhost:3000
npm run build Build your production site to ./dist/
npm run preview Preview your build locally, before deploying
npm run astro ... Run CLI commands like astro add, astro check
npm run astro -- --help Get help using the Astro CLI

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published