View Full Version : [CLOSED] Field markInvalid not make invalid the formPanel

8 Jul 2008, 12:23 PM
Hi all,
when I use the method markInvalid() on a field of a form panel it don't invalid the formPanel neither itself. Infact if I execute:

TextField field = new TextField();
username.markInvalid("Invalid field");

System.out.println("Field is valid:" +username.isValid());
The System.out print that the field is valid. It's a normal behavior?


9 Jul 2008, 6:28 PM
A field is not valid as determined by the isValid method. Typically, markInvalid is not called directly, rather by the fields themselves when validation fails. Calling markInvalid will have no effect on what is returned by isValid.

9 Jul 2008, 11:23 PM
Hi darrellmeyer (http://extjs.com/forum/member.php?u=4759),
thanks for your replay. So which is the correct method to invalidate a field if I want to execute a particular validation only when I decide to make it? (for example only when I press the submit button)


27 May 2010, 1:11 AM
Hi, do you find the solution to invalidate the field ?