当前位置:网站首页>el form 表单validate成功后没有执行逻辑
el form 表单validate成功后没有执行逻辑
2022-07-02 05:06:00 【进击的yuan人】
form 表单validate成功后没有执行逻辑
01.问题分析
1.验证表单不通过的时候会执行提示,通过后没有执行任何逻辑,如下图所示
2.按正确逻辑,控制台会输出success,但是验证通过后没有执行任务逻辑,因此得出是验证规则通过后的方法返回问题
02.查看已有规则
1.查看form表单rules逻辑,如下图所示
2.图中对年龄进行验证,为空值进行提示
3.很多时候都觉得这样验证时没有问题的,但是这里只执行了错误的逻辑,没有执行正确的逻辑,所以存在值得情况下需要执行正确的逻辑
03.问题解决
1.在验证方法添加正确的处理逻辑,如下图所示
2.图中添加了callbak()方法,用于验证通过后的逻辑执行
注意
1.所有自定义验证规则的方法,任何(情况)下都需要执行callback()方法
边栏推荐
- Promise all()
- Learn BeanShell before you dare to say you know JMeter
- Change deepin to Alibaba image source
- The underlying principle of go map (storage and capacity expansion)
- Exercise notes 13 (effective letter ectopic words)
- 关于Steam 教育的知识整理
- The reason why sizeof (ARR) / sizeof (arr[0]) is used in the function to calculate the length of the array is incorrect
- TypeScript类的使用
- 解析少儿编程中的动手搭建教程
- Getting started with pytest -- description of fixture parameters
猜你喜欢
Embedded-c language-8-character pointer array / large program implementation
Idea autoguide package and autodelete package Settings
[high speed bus] Introduction to jesd204b
TypeScript函数详解
解决:代理抛出异常错误
正大留4的主账户信息汇总
Express logistics quick query method, set the unsigned doc No. to refresh and query automatically
06 decorator mode
Idea automatic package import and automatic package deletion settings
Mathematical problems (number theory) trial division to judge prime numbers, decompose prime factors, and screen prime numbers
随机推荐
win10 磁盘管理 压缩卷 无法启动问题
js中的Map(含leetcode例题)
Cultivate primary and secondary school students' love for educational robots
Mathematical problems (number theory) trial division to judge prime numbers, decompose prime factors, and screen prime numbers
Summary of database problems
Unity particle Foundation
Mapping settings in elk (8) es
6.30 year end summary, end of student age
AcrelEMS高速公路微电网能效管理平台与智能照明解决方案智慧点亮隧道
Application of intelligent robot in agricultural ecology
[common error] the DDR type of FPGA device is selected incorrectly
国产全中文-自动化测试软件Apifox
Summary of main account information of zhengdaliu 4
Mathematical knowledge (Euler function)
Use of Baidu map
JS interview collection test question 1
从数组中找出和为目标的下标
C# 基于MQTTNet的服务端与客户端通信案例
Preparation for writing SAP ui5 applications using typescript
农业生态领域智能机器人的应用