Using Forms and Validator as well, I want to validate the field but skipping the empty value, its an optional field, but if the value of the field is empty the validator return anyway.
$phoneMobile = new Text('mobile');
        $phoneMobile->setFilters([
            'striptags', 'string'
        ]);
        $phoneMobile->addValidator(
            new Regex([
                'pattern' => '/^[0-9]+$/',
                'message' => 'Provide only numbers!!'
            ])
        );
        $this->add($phoneMobile);