1
<input data-parsley-trigger="focusout"
data-parsley-remote="/MailValidation"
data-parsley-remote-message="error"
placeholder="[email protected]"
type="email"
name="Mail"
id="Mail"
required
value="@Model.Mail"
class="form-control" />
JS
var p = $("form").parsley();
$('#SaveButton').click(function() {
p.validate();
if (p.isValid()) {
this.form.submit();
}
});
香菜無效。
p.isValid()
返回null
我無法使其工作。另外,我在互聯網上找不到任何whenValidate
的例子。我發現的資源非常不足。你能幫我解決這個問題嗎?