EasyUI Forum

General Category => General Discussion => Topic started by: cris168 on October 15, 2013, 07:18:10 AM



Title: Icon on Required Fields
Post by: cris168 on October 15, 2013, 07:18:10 AM
Hi,

      I'm using a this attribute data-options="required:true,validType:'text'" and it works fine.

      Problem:
             
             When I  assign a value on the textbox from a variable. And now, the textbox has the same value from the variable (which is not null or empty).

            How do we remove the icon that indicates that this field is required?  (We don't need the icon anymore because the textbox has a value already.)

            Please help.

Cris


Title: Re: Icon on Required Fields
Post by: stworthy on October 15, 2013, 08:11:22 PM
When you set a new value to the validate box, you need to call 'validate' method manually to refresh the validating information.
Code:
$('#box').val('new value').validatebox('validate');


Title: Re: Icon on Required Fields
Post by: cris168 on October 16, 2013, 07:49:36 AM
Hi stworthy,


       Thanks a lot! It's working now.

Cris