Hybrid View

  1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    15
    Vote Rating
    1
    m.sudharsanreddy is on a distinguished road

      0  

    Default TextField Validations

    TextField Validations


    Hi All,

    I have text field validation. When validation fails i am setting validation message and marking it to invalid.

    In this case error icon is displayed side to the text field and sour-ended with red color line.

    Instead of error icon and red color line I wanted to display warning icon side to text filed and sou-ended with warning color.

    Code:
    HTML Code:
    xtype: 'textfield',value: getValue(saasMoreInfo.siteInformation.serviceURL),anchor:'65%', fieldLabel: 'Service URL',msgTarget : 'side',listeners:{     blur: function(field){    field.setActiveError('Email Id is already mapped with an Account');    field.markInvalid('Email Id is already mapped with an Account');    }}
    Thanks in Advance....

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,197
    Vote Rating
    482
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    If you inspect the icon with a debugger, you can find the css rule / icon ..

    Then change the rule

    Code:
    .x-form-invalid-icon {
        width: 18px;
        height: 14px;
        background: no-repeat center center;
        // update the icon of your choice
        background-image: url('http://extjs.cachefly.net/ext-4.1.1-gpl/resources/themes/images/default/tree/drop-add.gif');
        overflow: hidden;
    }
    Scott.

Thread Participants: 1