code: protected function validateValue($value)
      {
          if (State::find()->andWhere(['id' => $value])->exists() === false) {
              return Yii::t('location', 'State with id {[id]} doesn\'t exist', [
                          'id' => $value
              ]);
          }
      }
docs: @inheritdoc
  
  Checks if the given region id exists.