【vue】option配置表单校验输入框禁止只有空格

news/2024/7/10 2:02:44 标签: vue

vue】option配置表单校验输入框禁止只有空格

  • option配置表单校验输入框禁止只有空格

option配置表单校验输入框禁止只有空格

代码示例:

 option: {
     column: [
       {
         label: "登录账号",
         prop: "account",
         maxlength: 255,
		 rules: [
              {
                required: true,
                message: "登录账号不能为空",
                trigger: "blur",
              },
              {
                whitespace: true, 
                message: "不能只输入空格", 
                trigger: "blur"
              }
         ] 
       }
     ]
 }

图片示例:
在这里插入图片描述


http://www.niftyadmin.cn/n/903321.html

相关文章

【vue】el-dialog点击外部不关闭对话框

【vue】el-dialog点击外部不关闭对话框代码示例<el-dialog title""append-to-body:close-on-click-modal "false":visible.sync"box"width"345px"><span>你好</span><span slot"footer"class"di…

【vue】下载字符串拼接的文件链接并重命名文件

【vue】下载字符串拼接的文件链接并重命名文件字符串拼接链接代码示例&#xff1a;this.url "http://127.0.0.1:8080/test/upload/20210128/2b35f9d7a64c3a6455a6e596c5c70fd7.xlsx"; this.filename "导出文件"; this.html <button type"button…

【java】按行读写txt文件

【java】按行读写txt文件按行读写txt文件按行读写txt文件 按行读写txt文件 FileReader fr null;FileWriter fw null;try {fr new FileReader("D:\\读.txt");BufferedReader br new BufferedReader(fr);List<String> list new ArrayList<>();String…

【java】lambda表达式之List操作

【java】lambda表达式之List操作【java】lambda表达式之List操作去重过滤抽取分组计数最值匹配求和【java】lambda表达式之List操作 去重 //按学生姓名去重 //可能会改变原有list的顺序 List<Student> list studentList.stream().collect(Collectors.collectingAndThe…

【vue】vue页面使用scss样式

【vue】vue页面使用scss样式 1.引入sass-loader模块【vue】vue页面使用scss样式//这里使用7.0.1版本 npm install sass-loader7.0.12.引入node-sass模块【vue】vue页面使用scss样式//这里使用4.12.0版本 npm install node-sass4.12.03.vue页面使用【vue】vue页面使用scss样式&l…

【java】IDEA在install编译的时候报Error:(30, 17) java: 找不到符号符号: 变量 log

【java】IDEA在install编译的时候报Error:(30, 17) java: 找不到符号符号: 变量 log 如果使用了Slf4j注解&#xff0c;idea需要Lombok插件&#xff0c;或者在maven中配置依赖 方法1.idea安装Lombok插件 方法2.pom.xml配置依赖 <dependency><groupId>org.project…

【vue】avue-crud行编辑

【vue】avue-crud行编辑 1.vue页面代码 <template><avue-crud ref"crud" :option"option" :data"data" row-update"rowUpdate"><template slot-scope"{row,index}" slot"menu"><el-button…

【vue】父页面按钮显示子组件中的el-dialog

1.父页面 <template><div><el-buttontype"primary"icon"el-icon-upload2"size"small"click"openDialog">导入</el-button><uploadDialog ref"uploadDialog" :dialogVisible"dialogVisible…