开发者

ExtJS Custom Vtypes

开发者 https://www.devze.com 2023-03-07 00:34 出处:网络
Iam using Vtypes for Changpassword window. My requirment is need to use only vtypes for all required/validations fields

Iam using Vtypes for Changpassword window. My requirment is need to use only vtypes for all required/validations fields So with out e开发者_开发技巧nter data clik on save its shows bubbles for required fields,but also show vtype for oldpassword not match.So how can use vtype after hitting database(From server) So is it possible?How

please provide some idea

Thanks in advance


You cannot use Ext.form.VTypes on the server unless you use some sort of JavaScript server (node.js with an ExtJS adapter - if there is one). You didn't mention the programming language you use on the server, so the answer is quite generic. To return errors from form posts that will be displayed as form field errors, your response to the form submit must conform to the following format:

{
    success: false,
    errors: {
        oldpassword: "Your current password does not match"
    }
}

The important part is the errors-structure. It contains key-value-pairs with the key being the name of the form field you'd like to display the error on and the value being the error message that will be displayed.

0

精彩评论

暂无评论...
验证码 换一张
取 消