当前位置:网站首页>Antd design form verification
Antd design form verification
2022-04-23 13:38:00 【Nianya】
The first general usage
<Form.Item
name={dataIndex}
style={
{
margin: 0,
}}
rules={[
{
required: must,
message: ` ${title} Can't be empty !`,
},
]}
>
{inputNode}
</Form.Item>
The second kind Add rules as needed
rules Validation rules
| Parameters | explain | type | The default value is |
|---|---|---|---|
| enum | Enumeration type | string | - |
| len | Field length | number | - |
| max | Maximum length | number | - |
| message | Check copy | string | ReactNode |
| min | Minimum length | number | - |
| pattern | Regular expression check | RegExp | - |
| required | Whether the choice | boolean | false |
| transform | Convert field values before validation | function(value) => transformedValue:any | - |
| type | Built-in check type , optional | string | ‘string’ |
| validator | Custom check ( Be careful ,callback Must be called ) | function(rule, value, callback) | - |
| whitespace | When the choice , Whether whitespace is considered an error | boolean | false |
版权声明
本文为[Nianya]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230605115851.html
边栏推荐
- Ding ~ your scholarship has arrived! C certified enterprise scholarship list released
- XML
- SPI NAND flash summary
- Why do you need to learn container technology to engage in cloud native development
- [point cloud series] pointfilter: point cloud filtering via encoder decoder modeling
- RTOS mainstream assessment
- Super 40W bonus pool waiting for you to fight! The second "Changsha bank Cup" Tencent yunqi innovation competition is hot!
- 浅谈js正则之test方法bug篇
- LeetCode_DFS_中等_695.岛屿的最大面积
- The interviewer dug a hole for me: how many concurrent TCP connections can a single server have?
猜你喜欢

零拷贝技术

How to build a line of code with M4 qprotex
![[point cloud series] full revolutionary geometric features](/img/00/701ba2f8130948329404dc4629ca46.png)
[point cloud series] full revolutionary geometric features

C语言之字符串与字符数组的区别

Xi'an CSDN signed a contract with Xi'an Siyuan University, opening a new chapter in IT talent training

"Xiangjian" Technology Salon | programmer & CSDN's advanced road

MySQL5.5安装教程

SPI NAND flash summary
![[point cloud series] unsupervised multi task feature learning on point clouds](/img/b0/4bead66deb8667bca287a3a191c182.png)
[point cloud series] unsupervised multi task feature learning on point clouds

MySQL 8.0.11 download, install and connect tutorials using visualization tools
随机推荐
innobackupex增量备份
【重心坐标插值、透视矫正插值】原理以及用法见解
UEFI learning 01-arm aarch64 compilation, armplatformpripeicore (SEC)
Using open to open a file in JNI returns a - 1 problem
[Journal Conference Series] IEEE series template download guide
【行走的笔记】
校园外卖系统 - 「农职邦」微信原生云开发小程序
软考系统集成项目管理工程师全真模拟题(含答案、解析)
What does the SQL name mean
MySQL 8.0.11 download, install and connect tutorials using visualization tools
2021年6月程序员工资统计,平均15052元,你拖后腿了吗?
@Excellent you! CSDN College Club President Recruitment!
Comparison and summary of applicable scenarios of Clickhouse and MySQL database
Machine learning -- PCA and LDA
Exemple de méthode de réalisation de l'action d'usinage à point fixe basée sur l'interruption de déclenchement du compteur à grande vitesse ob40 pendant le voyage de tia Expo
Common types and basic usage of input plug-in of logstash data processing service
100000 college students have become ape powder. What are you waiting for?
2020最新Android大厂高频面试题解析大全(BAT TMD JD 小米)
web三大组件之Filter、Listener
[point cloud series] Introduction to scene recognition