Skip to content

Instantly share code, notes, and snippets.

@hisaichi5518
Last active August 29, 2015 14:07
Show Gist options
  • Save hisaichi5518/df9bd737ee911f01e0e8 to your computer and use it in GitHub Desktop.
Save hisaichi5518/df9bd737ee911f01e0e8 to your computer and use it in GitHub Desktop.
$("#new_form").formValidator.parameters({
"user_email" : [["NotNull", "Email"]], # NotNull, Emailが並列で実行される
"user_email" : [["NotNull", "Email"], "Remote"], # NotNull, Emailが並列で実行されたあとにRemoteが実行される
"user_password": ["NotNull", "Password"]
})
$.extend($.formValidator.errorMessages, {
"user_email" : "メールアドレスデフォルト",
"user_email.notnull" : "必須項目です",
"user_email.email" : "メールアドレスが不正です",
"user_email.remote" : "このメールアドレスは、利用できません",
"user_email" : "メールアドレスデフォルト",
"user_email.notnull" : "必須項目です",
"user_email.email" : "メールアドレスが不正です",
"user_email.remote" : "このメールアドレスは、利用できません",
})
$("#new_form").formValidator.validate()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment