How to set minimum and maximum characters limit of a Add listing form fields

It would be handy if possibly the HivePress > Settings > Listings or other more appropriate page would allow to set minimum and maximum characters limit for a fields of a Add listing form.

Workaround can be:

add_filter(
‘hivepress/v1/forms/listing_update’,
function( $form ) {
$form[‘fields’][‘title’][‘min_length’] = 3;
$form[‘fields’][‘title’][‘max_length’] = 70;
$form[‘fields’][‘description’][‘min_length’] = 150;
$form[‘fields’][‘description’][‘max_length’] = 800;
$form[‘fields’][‘description’][‘description’] = ‘Comment displayed above the description field.’;
return $form;
}
);

Hi,

Thanks for the feature suggestion.

While this feature is not in the settings, this can be done with a code snippet that is available in our snippet collection [and the one that you shared]: Change maximum length of title and description for listings #hivepress #listings · GitHub