private static function fieldPhone(&$field) { $plus = substr($field, 0, 1) === '+' ? true : false; $self = new self(); $field = $self->whitelist('\\d\\-\\(\\) ')->maxLength(19)->apply($field); if ($plus) { $field = '+' . $field; } $self = new self(); $field = $self->maxLength(19)->apply($field); }