We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
数字以外の文字を含んでいる時点で、バリデーションエラーとなるはず。
サンプルコード
var logic = h5.core.logic(h5.validation.FormValidationLogic); logic.addRule({ check1: { min: 5 } }); var result = logic.validate({ check1: "6" }); // result.isValid = true var result = logic.validate({ check1: "6a" }); // result.isValid = true になってしまう。
version 1.2.2
The text was updated successfully, but these errors were encountered:
#547 バリデーションのmin/maxルールで、先頭が数字だと以降に以外の文字列を含んでいる場合バリデーションエラーとする。
ada797e
値をルールに適した型へ変換するとき、Number型かどうかの判定を追加しました。
#547 値の解釈にisNumberValue関数を使用するように変更。
7aa51f7
また、isNumberValue関数がh5.core.data.jsと重複して定義しているので、 内部モジュールとして分離する旨のTODOコメントを追記。
#547 min/maxルールで、先頭が数字で以降が数字以外の文字列を含むとバリデーションエラーになることを確認するテストケースを追加。
f078576
tom75s
No branches or pull requests
数字以外の文字を含んでいる時点で、バリデーションエラーとなるはず。
サンプルコード
version 1.2.2
The text was updated successfully, but these errors were encountered: