ThinkJs2.0开发手册
快速入门
  • 介绍
  • 创建项目
  • 项目结构
  • 代码规范
  • 升级指南
进阶应用
  • 模块
  • 控制器
  • 视图
  • 配置
  • 路由
模型
  • 介绍
  • 事务
  • 关联模型
  • Mysql
  • MongoDB
  • SQLite
Adapter
  • 介绍
  • Cache
  • Session
  • WebSocket
  • Template
扩展功能
  • thinkjs 命令
  • 静态资源访问
  • Middleware
  • Service
  • Cookie
  • 错误处理
  • 错误信息
  • 数据校验
  • 国际化
  • 路径常量
  • REST API
  • 定时任务
  • 线上部署
  • 推荐模块
API
  • think
  • think.base
  • think.http.base
  • http
  • controller
  • rest controller
  • model
  • model.mongo
  • middleware
ThinkJs2.0开发手册扩展功能数据校验
上一篇:错误信息 下一篇:国际化

数据校验

  • Logic 层
  • 数据校验配置
    • 配置格式
    • 参数格式
    • 支持的数据类型
    • 默认值
    • 获取数据的方式
    • 错误信息
    • 数据校验方法
    • 支持的校验类型
      • required
      • requiredIf
      • requiredNotIf
      • requiredWith
      • requiredWithAll
      • requiredWithout
      • requiredWithoutAll
      • contains
      • equals
      • different
      • before
      • after
      • alpha
      • alphaDash
      • alphaNumeric
      • alphaNumericDash
      • ascii
      • base64
      • byteLength
      • creditcard
      • currency
      • date
      • decimal
      • divisibleBy
      • email
      • fqdn
      • float
      • fullWidth
      • halfWidth
      • hexColor
      • hex
      • ip
      • ip4
      • ip6
      • isbn
      • iso8601
      • in
      • noin
      • int
      • min
      • max
      • length
      • minLength
      • maxLength
      • lowercase
      • uppercase
      • mobile
      • mongoId
      • multibyte
      • url
      • order
      • field
      • image
      • startWith
      • endWith
      • string
      • array
      • boolean
      • object
    • 扩展校验类型
上一篇:错误信息 下一篇:国际化