|
|
|
@ -22,18 +22,19 @@ class home_in { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
public static function name_demo(): array { |
|
|
|
public static function name_demo(): array { |
|
|
|
\tts\safer_io::init_json(); // Staticly set JSON data if any |
|
|
|
|
|
|
|
|
|
|
|
\tts\safer_io::grab_all_post_data(); |
|
|
|
|
|
|
|
|
|
|
|
$required_post_string_field = new IO(); |
|
|
|
$required_post_string_field = new IO(); |
|
|
|
$required_post_string_field->input_type = INPUTS::post; |
|
|
|
$required_post_string_field->input_type = INPUTS::json; |
|
|
|
$required_post_string_field->field_filter = FIELD_FILTER::raw_string; |
|
|
|
$required_post_string_field->field_filter = FIELD_FILTER::raw_string; |
|
|
|
$required_post_string_field->escape_html = HTML_FLAG::escape; |
|
|
|
$required_post_string_field->escape_html = HTML_FLAG::escape; |
|
|
|
$required_post_string_field->validation_rule = 'required|max: 75'; |
|
|
|
$required_post_string_field->validation_rule = 'required|max: 75'; |
|
|
|
$required_post_string_field->use_db_filter = DB_FILTER::OFF; |
|
|
|
$required_post_string_field->use_db_filter = DB_FILTER::ON; |
|
|
|
$required_post_string_field->skip_the_db = false; |
|
|
|
$required_post_string_field->skip_the_db = false; |
|
|
|
|
|
|
|
|
|
|
|
$adult_post_int_age_field = new IO(); |
|
|
|
$adult_post_int_age_field = new IO(); |
|
|
|
$adult_post_int_age_field->input_type = INPUTS::post; |
|
|
|
$adult_post_int_age_field->input_type = INPUTS::json; |
|
|
|
$adult_post_int_age_field->field_filter = FIELD_FILTER::integer_number; |
|
|
|
$adult_post_int_age_field->field_filter = FIELD_FILTER::integer_number; |
|
|
|
$adult_post_int_age_field->validation_rule = 'greater_than: 18'; |
|
|
|
$adult_post_int_age_field->validation_rule = 'greater_than: 18'; |
|
|
|
$adult_post_int_age_field->validation_message = ['greater_than' => 'The %s must be an Adult over %d!']; |
|
|
|
$adult_post_int_age_field->validation_message = ['greater_than' => 'The %s must be an Adult over %d!']; |
|
|
|
|