jQWidgets Forums

jQuery UI Widgets Forums Plugins Validator, Drag & Drop, Sortable jqx validator on Textarea

This topic contains 1 reply, has 2 voices, and was last updated by  Nadezhda 10 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • jqx validator on Textarea #67423

    Swapnil
    Participant

    I have a <textare> in my jsp and I want to add validator on that.
    But it is not getting triggered for any action. I tried ‘change blur valueChanged keyup’ etc

    <div class="span2">
          <textarea rows="4" cols="250" id="note"></textarea>
     </div>
    

    and the validator code is

    $('#form').jqxValidator(
                {	rules : [ {input: '#note', message: 'Maximum characters allowed are 255.', action: 'blur',
                            rule: function (input, commit) {
                                if(input.val().trim().length > 255) {
                                    return false;
                                }                            
                                return true;
                            }
                        }
    
                    ],
                    scroll : false,
                    theme : theme
                });
    

    Please let me know if I am missing something here.

    jqx validator on Textarea #67482

    Nadezhda
    Participant

    Hello Swapnil,

    Here is a sample with TextArea validation: http://jsfiddle.net/wg9tr8v8/

    Best Regards,
    Nadezhda

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.