Documentation

HasCountNotEqual extends AbstractValidator
in package
Uses TraverseTrait

Has count not equal validator 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

$description  : string|null
Validator description
$input  : mixed
Input value to test
$message  : string|null
Validator message - The message provided when the validation fails
$name  : string|null
Validator name
$results  : mixed
Validator results - Optional results to collect post-validation, would be something that was set by a custom validator in its "evaluate" method
$value  : mixed
Validator value to test against

Methods

__construct()  : mixed
Constructor
evaluate()  : bool
Method to evaluate the validator
getDescription()  : string|null
Get the validator description
getInput()  : mixed
Get the validator input
getMessage()  : string|null
Get the validator default message
getName()  : string|null
Get the validator name
getResults()  : mixed
Get the validator results
getValue()  : mixed
Get the validator value
hasDescription()  : bool
Has validator description
hasInput()  : bool
Has validator input
hasMessage()  : bool
Has validator message
hasName()  : bool
Has validator name
hasResults()  : bool
Has validator results
hasValue()  : bool
Has validator value
setDescription()  : static
Set the validator description
setInput()  : AbstractValidator
Set the validator input
setMessage()  : AbstractValidator
Set the validator condition
setName()  : static
Set the validator name
setValue()  : AbstractValidator
Set the validator value
traverseData()  : void
Traverse data

Properties

$description

Validator description

protected string|null $description = null

$message

Validator message - The message provided when the validation fails

protected string|null $message = null

$results

Validator results - Optional results to collect post-validation, would be something that was set by a custom validator in its "evaluate" method

protected mixed $results = null

Methods

__construct()

Constructor

public __construct([mixed $value = null ][, string|null $message = null ][, string|null $name = null ][, string|null $description = null ]) : mixed

Instantiate the validator object

Parameters
$value : mixed = null
$message : string|null = null
$name : string|null = null
$description : string|null = null

evaluate()

Method to evaluate the validator

public evaluate([mixed $input = null ]) : bool
Parameters
$input : mixed = null
Tags
throws
Exception
Return values
bool

getDescription()

Get the validator description

public getDescription() : string|null
Return values
string|null

getMessage()

Get the validator default message

public getMessage() : string|null
Return values
string|null

getName()

Get the validator name

public getName() : string|null
Return values
string|null

hasDescription()

Has validator description

public hasDescription() : bool
Return values
bool

hasMessage()

Has validator message

public hasMessage() : bool
Return values
bool

hasResults()

Has validator results

public hasResults() : bool
Return values
bool

setDescription()

Set the validator description

public setDescription([string|null $description = null ]) : static
Parameters
$description : string|null = null
Return values
static

setName()

Set the validator name

public setName([string|null $name = null ]) : static
Parameters
$name : string|null = null
Return values
static

traverseData()

Traverse data

public static traverseData(string $targetNode, mixed $data[, array<string|int, mixed> &$nodeValues = [] ][, string|null &$currentNode = null ][, int &$depth = 0 ]) : void
Parameters
$targetNode : string
$data : mixed
$nodeValues : array<string|int, mixed> = []
$currentNode : string|null = null
$depth : int = 0

        
On this page

Search results