<?php

declare(strict_types=1);

namespace ex\inputs\app;

class home_in {

    public static function name_demo(): array {
        $safer_data = \tts\safer_io::sanitize([
            'first_name' =>
                [
                    'input' => \tts\INPUTS::get, // Others: _post, _json (REQUIRED param)
                    'skip_db' => false, // this is an Optional value (DEFAULT: false)
                    'field' => \tts\FIELD_FILTER::raw, // Others: raw, (DEFAULT: string), email, url, float, int
                    'html' => \tts\HTML_FLAG::purify, // Others: strip, encode, purify, (DEFAULT: escape)
                    'rule' => 'required' // Others: email, valid_email_domain, 
                    // min, max, between, same, secure (password), alphanumeric
                ],
            'age' =>
                [
                    'input' => \tts\INPUTS::get,
                    'field' => \tts\FIELD_FILTER::integer_number,
                    'rule' => 'greater_than: 18', //'number_range: 18, 24'
                    'message' => ['greater_than' => 'Must be an Adult!']
                ],
        ]);
        
        return $safer_data; // Makes an Array of: fields, html, and errrors
    }

}