Default fields not required for specific category

I am using a code to disable some default fields but i need it to target only a specific category how do i do this? Below is my code but its affecting all categories globally. I need it to only be disabled for category 262. Please help ty

// 1. Modify data model requirements
add_filter( 'hivepress/v1/models/listing', function( $model ) {
    if ( isset( $model['fields']['title'] ) ) {
        $model['fields']['title']['required'] = false;
    }
    
    if ( isset( $model['fields']['description'] ) ) {
        $model['fields']['description']['required'] = false;
    }
    return $model;
}, 1000 );
// 2. Modify submission form validation
add_filter( 'hivepress/v1/forms/listing_submit', function( $form_args ) {
    if ( isset( $form_args['fields']['title'] ) ) {
        $form_args['fields']['title']['required'] = false;
    }
    
    if ( isset( $form_args['fields']['description'] ) ) {
        $form_args['fields']['description']['required'] = false;
    }
    return $form_args;
}, 10

00 );

Hi,

Please take a look at this sample code snippet Hide primary listing attributes for specific categories - #11 by ihor, it shows how to change the field parameters depending on the category. However, please note that an empty title or description can cause issues, as there may be places where they are required in the code.

I hope it helps