Joke Collection Website - Public benefit messages - Extjs verification is the name of the form. I used asynchronous verification to repeat the user name, but calling form.isValid() is always true.

Extjs verification is the name of the form. I used asynchronous verification to repeat the user name, but calling form.isValid() is always true.

The isValid method is a local method. It only checks the specified attributes and vType of the field contained in the form. If allowBlank is set to false, the isValid method returns false if the field is empty. If the vType is not satisfied, it will also return false. Others There is also NumberField's allowDecimal. The DateField value does not match the set format. Take a look at the API. There is nothing weird.

You mean to verify the validity from the server side. Obviously the client method is Unable to achieve. To achieve your requirements, the general approach is to record the status value yourself. Because of the asynchronous call, the status must be set to false before the verification is issued. After the call returns, the status value is set based on the return result.

Another: If there are multiple feilds with the same name in the form, the object obtained by the form.getValues ??method is represented by an array, such as: {username: ['abc', 'bcd'], password: 'abc ', ....}