Results 1 to 2 of 2

Thread: Beta3: Validators not working

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Oct 2008
    Vote Rating

    Default Beta3: Validators not working


    if I add a validator to a field, it often (but not always) validates an old value. I did not use the "autoValidate" function, but simply relied on "validateOnBlur". Thus, as soon as I leave the field and go to the next, the validator is executed an operated on an old value.

    This issue seems to be similar to the following post:

    I observed this behaviour with the following example program:

     public void onModuleLoad() {
      VerticalLayoutContainer c = new VerticalLayoutContainer();
      // create field with validator
      NumberField<Double> numberField = new NumberField<Double>( new NumberPropertyEditor.DoublePropertyEditor() );
      numberField.getValidators().add( new AbstractValidator<Double>() {
       public List<EditorError> validate(Editor<Double> editor, Double value) {
        return createError( editor, "I reject all values! Your value is " + value, value );
      } );
      c.add( new FieldLabel(numberField, "NumberField"), new VerticalLayoutData(1,-1) );
      // create another field
      TextField textField = new TextField();
      c.add( new FieldLabel(textField, "TextField"), new VerticalLayoutData(1,-1) );

  2. #2
    Sencha User WesleyMoy's Avatar
    Join Date
    Oct 2009
    Redwood City, California
    Vote Rating


    I'm not noticing this on Beta 4. Each time I hover the cursor over the error icon (when I am no longer focussed on the field), I see the correct value in the tooltip.

    Try your test case with Beta 4 and see if that resolves the issue. If you still notice problems, post a reply with your browser, OS, and whether you noticed this problem in development mode, production mode, or both.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts