addValidator('Regex', true, [ 'pattern' => '/^\d{3}-\d{2}-\d{4}$/', 'messages' => 'Number is in wrong format, use ' . $this->placeholder, ]); } }