LoginSignup
4
1

More than 3 years have passed since last update.

[JavaScript]パスワードと確認用の値を一致かどうか判断する方法

Posted at

はじめに

パスワードとパスワード(確認)を入力して一致しなければエラーが出るようにしたいけど…
Image from Gyazo

解決方法

パスワードフォームの記述の説明
・minlength:7 (7文字以上の入力だよ)
・require:"" (必須入力だよ)
・oninput:"CheckPassword(this)" (jsファイルの記述から呼び出ししてるよ)

views/customer_info.html.haml
Image from Gyazo

app/assets/javascript/signup.js
Image from Gyazo

参考記事

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1