GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - cakephp/validation: [READ-ONLY] Validation library from CakePHP. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp

BranchesTags
Open more actions menu

Latest commit

 

History

1,146 Commits
1,146 Commits

Folders and files

NameName
Last commit message
Last commit date
tests
tests
 
 
.gitattributes
.gitattributes
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
RulesProvider.php
RulesProvider.php
 
 
Validation.php
Validation.php
 
 
ValidationRule.php
ValidationRule.php
 
 
ValidationSet.php
ValidationSet.php
 
 
Validator.php
Validator.php
 
 
ValidatorAwareInterface.php
ValidatorAwareInterface.php
 
 
ValidatorAwareTrait.php
ValidatorAwareTrait.php
 
 
composer.json
composer.json
 
 
phpstan.neon.dist
phpstan.neon.dist
 
 

Repository files navigation

Total Downloads License

CakePHP Validation Library

The validation library in CakePHP provides features to build validators that can validate arbitrary arrays of data with ease.

Usage

Validator objects define the rules that apply to a set of fields. Validator objects contain a mapping between fields and validation sets. Creating a validator is simple:

use Cake\Validation\Validator;

$validator = new Validator();
$validator
    ->requirePresence('email')
    ->add('email', 'validFormat', [
        'rule' => 'email',
        'message' => 'E-mail must be valid'
    ])
    ->requirePresence('name')
    ->notEmptyString('name', 'We need your name.')
    ->requirePresence('comment')
    ->notEmptyString('comment', 'You need to give a comment.');

$errors = $validator->validate($_POST);
if ($errors) {
    // display errors.
}

Documentation

Please make sure you check the official documentation

About

[READ-ONLY] Validation library from CakePHP. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp

Resources

Readme
License
Activity
Custom properties

Stars

43 stars

Watchers

26 watching

Forks

8 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.