[ 'dataset_id' => new Assert\Optional([ new Assert\IsNull([], 'Dataset ID cannot be updated'), new Assert\NotBlank([], 'Dataset ID cannot be updated'), ]), 'prompt' => new Assert\Optional([ new Assert\Type('string'), ]), 'response' => new Assert\Optional([ new Assert\Type('string'), ]), 'priority' => new Assert\Optional([ new Assert\Type('integer'), ]), ], 'allowExtraFields' => true, ]); return $validator->validate($values, $constraint); } }