javascript - Kendo Validate - Ignore Specific Inputs - Stack Overflow

I am using Kendo validation to do some light front end validation.I am using an external API, that does

I am using Kendo validation to do some light front end validation.

I am using an external API, that does the back end validation for me, so I only need to validate a few inputs for format/required.

Currently, it is validating every input.

How can I specify elements to ignore.

I realize I can specify specific elements to validate, but I don't want to take this approach, as there are way more elements to validate than not to validate.

Thanks,

I am using Kendo validation to do some light front end validation.

I am using an external API, that does the back end validation for me, so I only need to validate a few inputs for format/required.

Currently, it is validating every input.

How can I specify elements to ignore.

I realize I can specify specific elements to validate, but I don't want to take this approach, as there are way more elements to validate than not to validate.

Thanks,

Share Improve this question asked Oct 28, 2015 at 15:12 MarkMark 4,8738 gold badges56 silver badges93 bronze badges 2
  • Have you tried this? It talks about hidden fields but you can apply this to any field. stackoverflow./questions/17850265/… – Rick S Commented Oct 28, 2015 at 15:24
  • what validation did you use and do you have a specific condition? you can create your custom validation and use them whenever you wanted – himawan_r Commented Oct 29, 2015 at 6:03
Add a ment  | 

1 Answer 1

Reset to default 5

You can set the disabled attribute on the input element for him to be ignored.

<input type="text" disabled></input>

in jquery:

$("input").prop("disabled",true);

or

$("input").attr("disabled","disabled");

The basic form element ignores the disabled fields for validation and serialization, I tried on with kendo validator and it works.

Here the question for html form: How can I manipulate a form / inputs to be ignored when a form is submitted

Hope it helped! :)

UPDATE

Just found that if you set to the input element the attribute "data-validate='false'" he will ignore because he uses this selector to get all the inputs to validate:

"$(':input:not(:button,[type=submit],[type=reset],[disabled],[readonly])[data-validate!=false]')"

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745302755a4621536.html

相关推荐

  • javascript - Kendo Validate - Ignore Specific Inputs - Stack Overflow

    I am using Kendo validation to do some light front end validation.I am using an external API, that does

    7小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信