<?php

namespace prj\{{.Root}}\inputs\{{.Subfolder}};

use \tts\safer_io as SafeIO;
use \tts\INPUTS;
use \tts\FIELD_FILTER;
use \tts\HTML_FLAG;

class {{.File}}_in {

    public static function {{.Method}}(): array {
        $safer_data = SafeIO::sanitize([
            'first_name' =>
                [
                    'input' => INPUTS::post, 
                    'field' => FIELD_FILTER::raw_string,
                    'html' => HTML_FLAG::escape,
                    'rule' => 'required|max: 75', // Others: email, valid_email_domain, 
                    // min, max, between, same, secure (password), alphanumeric
                    'message' => ['required' => 'Must fill out first_name!']
                ],
            'last_name' =>
                [
                    'input' => INPUTS::post,
                    'field' => FIELD_FILTER::raw_string,
                    'html' => HTML_FLAG::escape,
                    'rule' => 'required|max: 75',
                    'message' => ['required' => 'Must fill out last_name!']
                ],
        ]);
        
        return $safer_data; // Makes an Array of: fields, html, and errrors
    }

}
