How do I validate the validators passed as parameters for my jQuery plugin Does that include specific members / names?
For example, I want to acknowledge that the name given below includes 'name', 'id', & amp; 'Location', the three members, who should be true in this case.
Thanks in advance.
Johnny
You can use the method to determine that Each object must correspond to the required key rules:
var valid = arr.every (function (obj) {var keys = Object.keys (obj); returning keys.length === 3 & amp; amp; & amp; amp; amp; name; obj & amp; id; obj & amp; location 'obj;}););
No comments:
Post a Comment