webCOMAND

validate::valid()

Return whether or not all previous validations passed.

Prototype

string valid()

Return

Returns TRUE if all previous get(), post(), request() and value() validations were valid.  Otherwise FALSE.

Example

$validate = new \io_comand_web\validate();
$validate->request('email',
    ['trim', 'required', 'email'],
    'Invalid email address'
);
if($validate->valid()) {
    echo('Email is valid.');
}

Related

get(), post(), request(), value(), validation_errors().