<?php
// Включение ошибок
ini_set( "display_errors", 1 );
// Массив полей с параметрами где есть тип поля, массив ошибок, обязательность поля, имя на русском, значение
$allFields = [
'name' => ['type' => 'text', 'errors' => [], 'require' => true, 'value' => '', 'rusName' => 'Имя', 'checkLen' => true, 'class' => []],
'surname' => ['type' => 'text', 'errors' => [], 'require' => true, 'value' => '', 'rusName' => 'Фамилия', 'checkLen' => true, 'class' => []],
'age' => ['type' => 'text', 'errors' => [], 'require' => false, 'value' => '', 'rusName' => 'Возраст', 'checkLen' => false, 'class' => []],