guysartorelli/silverstripe-composable-validators 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

guysartorelli/silverstripe-composable-validators

最新稳定版本:3.0.1

Composer 安装命令:

composer require guysartorelli/silverstripe-composable-validators

包简介

Adds composable form validators with reusable validation logic.

README 文档

README

Thank you to Signify for making this module possible.

This module provides a number of reusable composable validators (including AJAX validation) for use both in the CMS and in frontend forms.

Make sure you check out the extensions documentation at a minimum - some of these should be applied in almost all projects using this module.

If your project has any automated client-side tests, or you are implementing a validator to be compatible with this module, please make sure you read the client side tests documentation.

Install

Install via composer:

composer require guysartorelli/silverstripe-composable-validators

Gotchas

Form submission with an AjaxCompositeValidator

The AjaxCompositeValidator adds a submit handler to your form. This doesn't always interact well with other submit handlers, and can result in either front-end validation being skipped or the form not submitting the way you expect it to, depending on which submit handler gets the event first. For best results, don't add additional submit handlers to the form.

If you're using the AjaxCompositeValidator on a form that uses undefinedoffset/silverstripe-nocaptcha, you should disable form submission handling for the NocaptchaField in that form (see instructions in the nocaptcha docs).

Available Validators

Abstract Validators

  • BaseValidator
    Includes methods useful for getting the actual FormField and its label.
  • FieldHasValueValidator
    Subclass of BaseValidator. Useful for validators that require logic to check if a field has any value or not.

Traits

统计信息

  • 总下载量: 2.58k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2023-07-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固