Documentation

ValidationRule

Classes implementing this one indicate their ability to test a variable and verify that it's contents are according to what was expected.

Tags
author

César de la Cal cesar@magic3w.com

Table of Contents

test()  : ValidationError|string|bool|null
This method checks if the content of a variable is ok. If this is not so it will return a validation error.

Methods

test()

This method checks if the content of a variable is ok. If this is not so it will return a validation error.

public test(mixed $value) : ValidationError|string|bool|null
Parameters
$value : mixed

The value to be tested

Return values
ValidationError|string|bool|null

Return a boolean or null value if everything was alright.

Search results