@@ -16,43 +16,43 @@ public function configurePackage(Package $package): void
1616
1717 public function bootingPackage (): void
1818 {
19+ $ this ->bootTranslations ();
20+
1921 Validator::extend ('alpha_space ' , static function ($ attribute , $ value ) {
2022 return is_string ($ value ) && preg_match ('/^[\pL\s]+$/u ' , $ value );
21- });
23+ }, __ ( ' laravel-rules::messages.alpha_space ' ) );
2224
2325 Validator::extend ('alpha_num_space ' , static function ($ attribute , $ value ) {
2426 if (! is_string ($ value ) && ! is_numeric ($ value )) {
2527 return false ;
2628 }
2729
2830 return preg_match ('/^[\pL\pM\pN\s]+$/u ' , $ value ) > 0 ;
29- });
31+ }, __ ( ' laravel-rules::messages.alpha_num_space ' ) );
3032
3133 Validator::extend ('alpha_dash_space ' , static function ($ attribute , $ value ) {
3234 if (! is_string ($ value ) && ! is_numeric ($ value )) {
3335 return false ;
3436 }
3537
3638 return preg_match ('#^[ \\\/\pL\s\pM\pN.,_-]+$#u ' , $ value ) > 0 ;
37- });
39+ }, __ ( ' laravel-rules::messages.alpha_dash_space ' ) );
3840
3941 Validator::extend ('alpha_dash_space_and ' , static function ($ attribute , $ value ) {
4042 if (! is_string ($ value ) && ! is_numeric ($ value )) {
4143 return false ;
4244 }
4345
4446 return preg_match ('#^[ \\\/\pL\s\pM\pN.&,_-]+$#u ' , $ value ) > 0 ;
45- });
47+ }, __ ( ' laravel-rules::messages.alpha_dash_space_and ' ) );
4648
4749 Validator::extend ('alpha_dash_space_at ' , static function ($ attribute , $ value ) {
4850 if (! is_string ($ value ) && ! is_numeric ($ value )) {
4951 return false ;
5052 }
5153
5254 return preg_match ('#^[ \\\/\pL\s\pM\pN.@,_-]+$#u ' , $ value ) > 0 ;
53- });
54-
55- $ this ->bootTranslations ();
55+ }, __ ('laravel-rules::messages.alpha_dash_space_at ' ));
5656 }
5757
5858 //override spatie package shortname() that strips out 'laravel'
0 commit comments