当前位置:网站首页>Laravel admin form validation
Laravel admin form validation
2022-04-23 11:18:00 【Scholar and】
$form->text("name", " full name ")
->creationRules('required|unique:table', ['required' => ' Name cannot be empty ','unique' => ' The name cannot be repeated '])
->updateRules('required|unique:table,name,{
{id}}', ['required' => ' Name cannot be empty ','unique' => ' The name cannot be repeated '])
->required();
//table: Table name
//creationRules: Verify when adding
//updateRules: Verify while editing ,table Table exclusion conditions id For the current id The data of ,name Can't repeat
//{
{id}}: Just write as usual
//required(): The required fields are marked with a red star
版权声明
本文为[Scholar and]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231116051542.html
边栏推荐
- An interesting interview question
- Software testers, how to mention bugs?
- After the MySQL router is reinstalled, it reconnects to the cluster for boot - a problem that has been configured in this host before
- Excel · VBA array bubble sorting function
- Solve the problem of "suncertpathbuilderexception: unable to find valid certification path to requested target"
- MySQL分区表实现按月份归类
- mysql中整数数据类型tinyint详解
- ffmpeg命令行常用参数
- Oracle connectivity test gadget
- Microsoft Access database using PHP PDO ODBC sample
猜你喜欢
CUMCM 2021-b: preparation of C4 olefins by ethanol coupling (2)
学习 Go 语言 0x04:《Go 语言之旅》中切片的练习题代码
Excel·VBA自定义函数获取单元格多数值
实践数据湖iceberg 第三十课 mysql->iceberg,不同客户端有时区问题
Visual Road (XII) detailed explanation of collection class
ConstraintLayout布局
Jupyter Lab 十大高生产力插件
qt5.8 64 位静态库中想使用sqlite但静态库没有编译支持库的方法
laravel编写Console脚本
数据库管理软件SQLPro for SQLite for Mac 2022.30
随机推荐
Understanding of fileprovider path configuration strategy
防止web项目中的SQL注入
Detailed explanation of writing sequence and execution sequence of MySQL series SQL query statements
Applet payment
QT 怎么把QWigdet变成QDialog
语雀文档编辑器将开源:始于但不止于Markdown
vm设置静态虚拟机
MySQL8.0升级的踩坑历险记
MBA - day5 mathématiques - Questions d'application - Questions d'ingénierie
Using El popconfirm and El backtop does not take effect
My creation anniversary
The songbird document editor will be open source: starting with but not limited to markdown
QT信号量 无法解析的错误的总结
Promise详解
MIT:用无监督为世界上每个像素都打上标签!人类:再也不用为1小时视频花800个小时了
R-drop: a more powerful dropout regularization method
laravel编写Console脚本
初探 Lambda Powertools TypeScript
JDBC – PreparedStatement – 如何设置 Null 值?
Jupyter lab top ten high productivity plug-ins