File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,16 @@ public function __construct(user $user)
2525 $ this ->user = $ user ;
2626 }
2727
28+ public function validate_author_name ($ value )
29+ {
30+ if (strlen ($ value ))
31+ {
32+ return $ value ;
33+ }
34+
35+ throw new \RuntimeException ($ this ->user ->lang ('SKELETON_INVALID_AUTHOR_NAME ' ));
36+ }
37+
2838 public function validate_num_authors ($ value )
2939 {
3040 if (preg_match ('#^\d+$# ' , $ value ) && $ value > 0 && $ value <= 20 )
@@ -45,6 +55,16 @@ public function validate_extension_name($value)
4555 throw new \RuntimeException ($ this ->user ->lang ('SKELETON_INVALID_EXTENSION_NAME ' ));
4656 }
4757
58+ public function validate_extension_display_name ($ value )
59+ {
60+ if (strlen ($ value ))
61+ {
62+ return $ value ;
63+ }
64+
65+ throw new \RuntimeException ($ this ->user ->lang ('SKELETON_INVALID_EXTENSION_NAME ' ));
66+ }
67+
4868 public function validate_extension_time ($ value )
4969 {
5070 if (preg_match ('#^\d{4}\-\d{2}\-\d{2}$# ' , $ value ))
Original file line number Diff line number Diff line change 9898 'SKELETON_TITLE_REQUIREMENT_INFO ' => 'Requirements ' ,
9999 'SKELETON_TITLE_COMPONENT_INFO ' => 'Components ' ,
100100
101+ 'SKELETON_INVALID_AUTHOR_NAME ' => 'The author name is required ' ,
101102 'SKELETON_INVALID_EXTENSION_NAME ' => 'The extension name you provided is invalid ' ,
102103 'SKELETON_INVALID_EXTENSION_TIME ' => 'The extension date you provided is invalid ' ,
103- 'SKELETON_INVALID_EXTENSION_VERSION ' => 'The extension version you provided is invalid ' ,
104- 'SKELETON_INVALID_NUM_AUTHORS ' => 'The number of authors you provided is invalid ' ,
105- 'SKELETON_INVALID_VENDOR_NAME ' => 'The vendor name you provided is invalid ' ,
104+ 'SKELETON_INVALID_EXTENSION_VERSION ' => 'The extension version you provided is invalid ' ,
105+ 'SKELETON_INVALID_NUM_AUTHORS ' => 'The number of authors you provided is invalid ' ,
106+ 'SKELETON_INVALID_VENDOR_NAME ' => 'The vendor name you provided is invalid ' ,
106107));
You can’t perform that action at this time.
0 commit comments