Field validation problem

In the blue box as shown, click Edit to bring up the config page.

In the config page, the first three fields of the configuration are required. So when you do not fill in the first three fields, the red box will prompt, the verification will not pass.


However, as long as the name field is entered in the config Page, no other fields are entered. After clicking the update, the previous node blue box area field is verified.
Now I want all the fields in the config Page to be verified as failing. After clicking the update button, the verification fails (red box display). I don't know how to achieve it?

Hi @limengsong,
Could you please explain it a bit more from here on? It is not clear to me where the 'name' field is on your screenshot, and how it is related to the 3 mandatory fields in red.
Bart


as the picture shows:
In the OPCUA field in Step1, the verification result comes from the first three fields (name, variable address, endpoint url) in Step 2. When the three fields in Step2 are verified, the OPCUA field in the Step1 diagram passes, otherwise the verification fails.

Ah ok. Thanks for adding the english translations to your fields :wink:
So when one of the fields in the config node screen is invalid (i.e. red border), you want the OPCUA field also to be invalid (i.e. red border)? Have I understood it correctly?

Yes!
I tried a method and it has been implemented. But the method is not official!

opcua: {
                type: "opcua-data",
                validate: function () {
                    let pt = $("#node-input-payloadType").val();
                    let ua = $("#node-input-opcua").val();
                    let rlt=false;
                    //如果数据源选择的类型为opc ua则进行opcua config页面中字段的验证
                    if(pt!=='opcua'){
                        rlt=true;
                        return rlt;
                    }else{
                        // 验证opcua config页面中必输字段的验证
                        let opcUaNode={};
                        if(ua!==''){
                            opcUaNode=RED.nodes.node(ua);
                            if(opcUaNode&&opcUaNode.pointName&&opcUaNode.name&&opcUaNode.endPointUrl){
                                //这三个都通过了后,就验证是否是用户登陆,验证用户名和密码:
                                if(opcUaNode.anonymous==='anonymous'){
                                    rlt=true;
                                    return rlt;
                                }else{
                                    //非匿名登陆,验证用户名密码:
                                    if(opcUaNode.userName===''||opcUaNode.passWord===''){
                                        rlt=false;
                                    }else{
                                        rlt=true;
                                    }
                                }
                                
                            }else{
                                rlt=false;
                                return rlt;
                            }
                        }

                    }
                    return rlt;
                }
            },