Ajax callback, dynamic select and illegal choice

Hello, i got some issues with my form public function buildForm(array $form, FormStateInterface $form_state, $id = NULL) { $form[‘type_formation’] = array( ‘#type’ => ‘select’, ‘#title’ => (‘Choisissez le type de formation :’), ‘#options’ => $options, ‘#default_value’ => $id, ‘#prefix’=>'<div class=”col-lg-8″>’, ‘#suffix’=>'</div>’, ‘#required’=> true, ‘#ajax’ =>[…]