当前位置:网站首页>No logic is executed after the El form is validated successfully
No logic is executed after the El form is validated successfully
2022-07-02 05:08:00 【Attacking Yuan people】
form Forms validate No logic is executed after success
01. Problem analysis
1. The prompt will be executed when the verification form fails , No logic is executed after passing , As shown in the figure below

2. According to the correct logic , The console will output success, But the task logic is not executed after the verification , Therefore, it is the method return problem after the validation rule passes
02. View existing rules
1. see form Forms rules Logic , As shown in the figure below

2. The age is verified in the figure , Prompt for null value
3. Most of the time, I feel that there is no problem in such verification , But only the wrong logic is executed here , Not executing the correct logic , Therefore, it is necessary to execute the correct logic when it is worth it
03. Problem solving
1. Add correct processing logic to the verification method , As shown in the figure below

2. Added callbak() Method , Used for logical execution after verification
Be careful
1. All methods of customizing validation rules , whatever ( situation ) It needs to be implemented in all cases callback() Method
边栏推荐
- How to make an RPM file
- Go implements leetcode rotation array
- C# 图片显示占用问题
- 数学知识——快速幂的理解及例题
- A new attribute value must be added to the entity entity class in the code, but there is no corresponding column in the database table
- LM09丨费雪逆变换反转网格策略
- 函数中使用sizeof(arr) / sizeof(arr[0])求数组长度不正确的原因
- Getting started with pytest ----- confitest Application of PY
- Mathematical problems (number theory) trial division to judge prime numbers, decompose prime factors, and screen prime numbers
- List of common bugs in software testing
猜你喜欢

06 装饰(Decorator)模式

Getting started with pytest -- description of fixture parameters

Interview question: do you know the difference between deep copy and shallow copy? What is a reference copy?

Summary of common string processing functions in C language

数学问题(数论)试除法做质数的判断、分解质因数,筛质数

关于Steam 教育的知识整理

Video cover image setting, put cover images into multiple videos in the simplest way

Summary of database problems

奠定少儿编程成为基础学科的原理

Future trend of automated testing ----- self healing technology
随机推荐
奠定少儿编程成为基础学科的原理
初学爬虫-笔趣阁爬虫
Online incremental migration of DM database
Oracle和MySQL的基本区别(入门级)
Starting from the classification of database, I understand the map database
JS interview collection test question 1
Rhcsa --- work on the fourth day
leetcode存在重复元素go实现
Cubemx DMA notes
解析少儿编程中的动手搭建教程
js面试收藏试题1
Solution of DM database unable to open graphical interface
Ansible installation and use
fastText文本分类
LeetCode 1175. 质数排列(质数判断+组合数学)
Record my pytorch installation process and errors
TypeScript类的使用
國產全中文-自動化測試軟件Apifox
06 装饰(Decorator)模式
CubeMx DMA笔记