Validation\Validator\Digit

Class Phalcon\Validation\Validator\Digit

extends abstract class Phalcon\Validation\Validator

implements Phalcon\Validation\ValidatorInterface

Source on GitHub

Check for numeric character(s)

use Phalcon\Validation\Validator\Digit as DigitValidator;

$validator->add(
    "height",
    new DigitValidator(
        [
            "message" => ":field must be numeric",
        ]
    )
);

$validator->add(
    [
        "height",
        "width",
    ],
    n