Commit 34e51fda authored by Miguel Guerreiro's avatar Miguel Guerreiro Committed by Miguel Guerreiro
Browse files

Issue #3168703 by gueguerreiro: Explicitly validate NULL values in the rating

parent 7569741b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ class HelpfulnessBlockForm extends FormBase {
  public function validateForm(array &$form, FormStateInterface $form_state) {
    $config = $this->config('helpfulness.settings');

    if (!$form_state->getValue('helpfulness_rating')) {
    if ($form_state->getValue('helpfulness_rating') === NULL) {
      $form_state->setErrorByName('helpfulness_rating', $this->t('Please indicate if this page is helpful or not.'));
    }