<?php
class Validator {
    public static function email(string $v): bool { return filter_var($v, FILTER_VALIDATE_EMAIL) !== false; }
    public static function nonempty(string $v): bool { return trim($v) !== ''; }
}