Results 1 to 3 of 3

Thread: Initial validation for form fields after bind

  1. #1

    Default Initial validation for form fields after bind

    Hi folks,

    I have a panel that contains a number of form fields. These fields are bound to an empty model that is hosted in the view model attached to the panel. The model has a number of validators which ensure things like non empty values in the fields. If I click a form field and then click off without typing I see the validator is working because the field is highlighted red. However, initially the field is not red. How can I indicate the fields invalid state at load (after bind)?

    Example fiddle demonstrating issue:

    As soon as the fiddle loads youll see a simple form. Immediately click the save button. Notice the app reports you need to fix errors before saving. Next, click inside the name field, DONT TYPE, then click into the notes field. Notice the name field turns red.

    How can I get this field to START red, to alert the user they need to enter a value into the field?

  2. #2


    I recently tried to add code to iterate over the fields, give focus, then take it away, but that didn't seem to do the trick.

  3. #3
    Sencha User
    Join Date
    Feb 2013


    Have you tried use the isValid() method after the form renders?

Similar Threads

  1. Replies: 7
    Last Post: 31 May 2015, 7:56 PM
  2. Replies: 1
    Last Post: 19 Jul 2014, 3:22 PM
  3. Replies: 4
    Last Post: 25 Jun 2012, 2:41 AM

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