Write validation helpers 

sub fill_in_form {
    my($form_data, %opt) = @_;

    # Simplified version
    $global{fill_in_values} = $form_data;
    $global{fill_in_opt}    = \%opt;
}