Javascript validation for text area -
i have text area should accept values format on on change validation: string1-value1
, string2-value2
, string3-value3
,... example india - ind, usa - us, kenya - kya. how can using javascript validation. tried validations, not working. please me.
try autocomplete
// can append strategies existing textcomplete object. $('#textarea1').textcomplete([ { // tech companies words: ['apple', 'google', 'facebook', 'github'], match: /\b(\w{2,})$/, search: function (term, callback) { callback($.map(this.words, function (word) { return word.indexof(term) === 0 ? word : null; })); }, index: 1, replace: function (word) { return word + ' '; }, placement: 'top' } ]);
Comments
Post a Comment