I am using xeditable to have inline editable functionality, but now I am stuck trying to validate my input.
Here is an example using jsFiddle
I tried the below code with no success.
validate: function(value) {
if($.trim(value) == '')
return 'This field is required';
}
value
to the console? Only thing I would add is the curly braces to theif
, e.g.if($.trim(value) == '') { return 'This field is required'; }
.