vitalets / x-editable

In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
http://vitalets.github.io/x-editable
MIT License
6.51k stars 1.73k forks source link

Don't want to return any string ..or is there any way to validate multiple input field show error just below input field #1095

Open kamarshad opened 6 years ago

kamarshad commented 6 years ago

hi @vitalets i want to validate some input but dont want to return string, how i can do Actually i have multiple inputs fields and i want to show error just below the input field validate: function(value) { if (value === null || value === '') { here i want to create new css return ''; } }

vitalets commented 6 years ago

hi! The easiest way is to return space:

validate: function(value) {
   if (value === null || value === '') {
      // show custom error and return space to avoid embeded error
      return ' ';
   }
}