Vue step: Vue + element UI form validation has value but failed.

Time:2020-3-1
1、 As shown in the figure: there is value but verification fails

 

 

Two.
export default {
   data() {
     return {
       form: {
         template: null
       }
       rules: [
         Template: {required: true, message: 'data template cannot be empty', trigger: 'blur'}
       ]
     }
   }
 }

 

The above is the correct verification example. Three.
At present, two situations lead to validation failure. When using the custom validation form, it is found that the value value is undefined: 1. The value names of prop and V-model are inconsistent

 

1 must be consistent with 2 names, and 3 variables must be consistent with 2 prop

2. If there is no declared variable in data {}, the validation will fail, and the value obtained will be undefined.

 

 

 

 

 

 

 

 

Recommended Today

Build HTTP service with C + + Mongoose

Mongoose source code address:https://github.com/cesanta/mo… Mongoose user manual:https://www.cesanta.com/devel… Mngoose set up HTTP service #include <string> #include “mongoose.h” using namespace std; static const char *s_http_port = “8000”; static void ev_handler(mg_connection *nc, int ev, void *ev_data) { struct http_message *hm = (struct http_message *) ev_data; if (ev == MG_EV_HTTP_REQUEST) { std::string uri; if (hm->uri.p && hm->uri.p[0] == ‘/’) […]