A Sample PHP Project for the tts_framework.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

40 lines
1.1 KiB

<?php
declare(strict_types=1);
namespace prj\{{.Root}}\inputs\{{.Subfolder}};
use \bs_tts\INPUTS;
use \bs_tts\FIELD_FILTER;
use \bs_tts\HTML_FLAG;
use \bs_tts\DB_FILTER;
use \bs_tts\use_io as IO;
class {{.File}}_in {
/*
* Validation_rules: required, email, valid_email_domain,
* min, max, between, same, secure (password), alphanumeric
* number_range: X, X
* greater_than
* less_than
*/
public static function {{.Method}}(): array {
\bs_tts\safer_io::init_json(); // Staticly set JSON data if any
$required_post_string_field = new IO();
$required_post_string_field->input_type = INPUTS::post;
$required_post_string_field->field_filter = FIELD_FILTER::raw_string;
$required_post_string_field->escape_html = HTML_FLAG::escape;
$required_post_string_field->validation_rule = 'required|max: 75';
$required_post_string_field->use_db_filter = DB_FILTER::OFF;
$required_post_string_field->skip_the_db = false;
return [
'first_name' => $required_post_string_field,
'last_name' => $required_post_string_field
];
}
}