@@ 736-746 (lines=11) @@ | ||
733 | } |
|
734 | } |
|
735 | ||
736 | public static function unicodeLetters($value, $message = '') |
|
737 | { |
|
738 | static::string($value); |
|
739 | ||
740 | if (!preg_match('/^\p{L}+$/u', $value)) { |
|
741 | static::reportInvalidArgument(sprintf( |
|
742 | $message ?: 'Expected a value to contain only Unicode letters. Got: %s', |
|
743 | static::valueToString($value) |
|
744 | )); |
|
745 | } |
|
746 | } |
|
747 | ||
748 | public static function alpha($value, $message = '') |
|
749 | { |
|
@@ 870-880 (lines=11) @@ | ||
867 | } |
|
868 | } |
|
869 | ||
870 | public static function fileExists($value, $message = '') |
|
871 | { |
|
872 | static::string($value); |
|
873 | ||
874 | if (!file_exists($value)) { |
|
875 | static::reportInvalidArgument(sprintf( |
|
876 | $message ?: 'The file %s does not exist.', |
|
877 | static::valueToString($value) |
|
878 | )); |
|
879 | } |
|
880 | } |
|
881 | ||
882 | public static function file($value, $message = '') |
|
883 | { |