|
|
|
@ -1,16 +1,19 @@ |
|
|
|
<?php |
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1); |
|
|
|
|
|
|
|
|
|
|
|
namespace prj\{{.Root}}\inputs\{{.Subfolder}}; |
|
|
|
namespace prj\{{.Root}}\inputs\{{.Subfolder}}; |
|
|
|
|
|
|
|
|
|
|
|
use \tts\safer_io as SafeIO; |
|
|
|
|
|
|
|
use \tts\INPUTS; |
|
|
|
use \tts\INPUTS; |
|
|
|
use \tts\FIELD_FILTER; |
|
|
|
use \tts\FIELD_FILTER; |
|
|
|
use \tts\HTML_FLAG; |
|
|
|
use \tts\HTML_FLAG; |
|
|
|
|
|
|
|
use \tts\DB_FILTER; |
|
|
|
|
|
|
|
|
|
|
|
class {{.File}}_in { |
|
|
|
class {{.File}}_in { |
|
|
|
|
|
|
|
|
|
|
|
public static function {{.Method}}(): array { |
|
|
|
public static function {{.Method}}(): array { |
|
|
|
$safer_data = SafeIO::sanitize([ |
|
|
|
\tts\safer_io::init_json(); // Staticly set JSON data if any |
|
|
|
|
|
|
|
return [ |
|
|
|
'first_name' => |
|
|
|
'first_name' => |
|
|
|
[ |
|
|
|
[ |
|
|
|
'input' => INPUTS::post, |
|
|
|
'input' => INPUTS::post, |
|
|
|
@ -18,7 +21,9 @@ class {{.File}}_in { |
|
|
|
'html' => HTML_FLAG::escape, |
|
|
|
'html' => HTML_FLAG::escape, |
|
|
|
'rule' => 'required|max: 75', // Others: email, valid_email_domain, |
|
|
|
'rule' => 'required|max: 75', // Others: email, valid_email_domain, |
|
|
|
// min, max, between, same, secure (password), alphanumeric |
|
|
|
// min, max, between, same, secure (password), alphanumeric |
|
|
|
'message' => ['required' => 'Must fill out first_name!'] |
|
|
|
'message' => ['required' => 'Must fill out first_name!'], |
|
|
|
|
|
|
|
'db' => DB_FILTER::OFF, // Should be used on Login Data only |
|
|
|
|
|
|
|
'skip_db' => false // Should not save? |
|
|
|
], |
|
|
|
], |
|
|
|
'last_name' => |
|
|
|
'last_name' => |
|
|
|
[ |
|
|
|
[ |
|
|
|
@ -26,11 +31,10 @@ class {{.File}}_in { |
|
|
|
'field' => FIELD_FILTER::raw_string, |
|
|
|
'field' => FIELD_FILTER::raw_string, |
|
|
|
'html' => HTML_FLAG::escape, |
|
|
|
'html' => HTML_FLAG::escape, |
|
|
|
'rule' => 'required|max: 75', |
|
|
|
'rule' => 'required|max: 75', |
|
|
|
'message' => ['required' => 'Must fill out last_name!'] |
|
|
|
'message' => ['required' => 'Must fill out last_name!'], |
|
|
|
|
|
|
|
'db' => DB_FILTER::OFF // Should be used on Login Data only |
|
|
|
], |
|
|
|
], |
|
|
|
]); |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
return $safer_data; // Makes an Array of: fields, html, and errrors |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|