• In render_field_settings($field).

    Set required to true otherwise it will allow empty values and break the code elsewhere.

    
                acf_render_field_setting($field, array(
                    'label'			=> __('Total Years', 'acf'),
                    'instructions'	=> '',
                    'name'			=> 'total_years',
                    'type'			=> 'number',
                    'min'           => 1,
                    'max'           => 999,
                    'required'      => true,
                ));
    
  • The topic ‘bugfix – total_years not required’ is closed to new replies.