html5 - Kendo Validator for email list with MVVM -
is there validator email list? want email list kendo input.
this code: html page
<form id="idform"> <label for="p">e-mail</label> <input type="email" data-bind="value: mail" id="p" name="mail" class="formcontrol" placeholder="mail" required data-email-msg="email format not valid" /> </form>
js page
var page = { vm: null, _idform:"idform", bind: function(){ this.vm = kendo.observable({ mail: null }); page.kendobind(page._idform); }, kendobind: function(id){ kendoutils.bind(id, page.vm); }, send: function(){ page._validator = $("#" + page._idform).kendovalidator().data("kendovalidator"); $("#" + page._idform).submit(function(event) { if (page._validator.validate()) { console.log("valid"); } }); } } $(document).ready(function () { page.bind(); page.kendobind(); page.send(); });
the input not accept more 1 email
Comments
Post a Comment