Documentation

Rule
in package

Validator rule class

Tags
category

Pop

author

Nick Sagona, III dev@noladev.com

copyright

Copyright (c) 2009-2025 NOLA Interactive, LLC.

license

http://www.popphp.org/license New BSD License

version
4.5.0

Table of Contents

Properties

$hasClasses  : array<string|int, mixed>
"Has" classes
$hasOneClasses  : array<string|int, mixed>
"Has one" classes

Methods

isHasClass()  : bool
Is a "has" class
isHasOneClass()  : bool
Is a "has" class
parse()  : array<string|int, mixed>
Parse rule

Properties

$hasClasses

"Has" classes

protected static array<string|int, mixed> $hasClasses = ['HasOneThatEquals', 'HasOnlyOneThatEquals', 'HasCountEqual', 'HasCountGreaterThanEqual', 'HasCountGreaterThan', 'HasCountLessThanEqual', 'HasCountLessThan', 'HasCountNotEqual']

$hasOneClasses

"Has one" classes

protected static array<string|int, mixed> $hasOneClasses = ['HasOne', 'HasOnlyOne']

Methods

isHasClass()

Is a "has" class

public static isHasClass(string $class[, bool $both = false ][, string|null $prefix = 'Pop\Validator\' ]) : bool
Parameters
$class : string
$both : bool = false
$prefix : string|null = 'Pop\Validator\'
Return values
bool

isHasOneClass()

Is a "has" class

public static isHasOneClass(string $class[, string|null $prefix = 'Pop\Validator\' ]) : bool
Parameters
$class : string
$prefix : string|null = 'Pop\Validator\'
Return values
bool

parse()

Parse rule

public static parse(string $rule[, string|null $prefix = 'Pop\Validator\' ]) : array<string|int, mixed>
Parameters
$rule : string
$prefix : string|null = 'Pop\Validator\'
Tags
throws
InvalidArgumentException
Return values
array<string|int, mixed>

        
On this page

Search results