el-input校验是否输入
时间: 2023-08-19 07:16:14 浏览: 154
vue实现表单数据验证的实例代码
el-input校验是否输入可以通过设置required属性来实现。在引用\[2\]中的示例代码中,可以看到在rules中设置了houseNumber的required属性为true,这表示该输入框必须输入值。所以,如果要校验el-input是否输入,可以在rules中设置相应的required属性为true。
#### 引用[.reference_title]
- *1* *3* [Elementui el-input 输入框校验以及校验表单校验](https://blog.csdn.net/jbossjf/article/details/124238943)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [el-input校验只能输入正整数](https://blog.csdn.net/qq_43962582/article/details/124043289)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文