diff --git a/scheduler.module b/scheduler.module
index 03fb2a4..55e6fd6 100644
--- a/scheduler.module
+++ b/scheduler.module
@@ -139,7 +139,8 @@ function scheduler_entity_base_field_info(EntityTypeInterface $entity_type) {
       ])
       ->setDisplayConfigurable('form', TRUE)
       ->setTranslatable(TRUE)
-      ->setRevisionable(TRUE);
+      ->setRevisionable(TRUE)
+      ->addConstraint('SchedulerPublishOn');
 
     $fields['unpublish_on'] = BaseFieldDefinition::create('timestamp')
       ->setLabel(t('Unpublish on'))
@@ -342,9 +343,6 @@ function scheduler_node_validate($node, array $form, FormStateInterface $form_st
     if ($publishtime === FALSE) {
       $form_state->setErrorByName('publish_on', t("The 'publish on' value does not match the expected format of %time", array('%time' => format_date(REQUEST_TIME, 'custom', $date_format))));
     }
-    elseif ($publishtime && variable_get('scheduler_publish_past_date_' . $node->getType(), 'error') == 'error' && $publishtime < REQUEST_TIME) {
-      $form_state->setErrorByName('publish_on', t("The 'publish on' date must be in the future"));
-    }
   }
 
   if (!empty($node->unpublish_on->value) && !is_numeric($node->unpublish_on->value)) {
diff --git a/src/Plugin/Validation/Constraint/SchedulerPublishOnConstraint.php b/src/Plugin/Validation/Constraint/SchedulerPublishOnConstraint.php
index e69de29..ff0443d 100644
--- a/src/Plugin/Validation/Constraint/SchedulerPublishOnConstraint.php
+++ b/src/Plugin/Validation/Constraint/SchedulerPublishOnConstraint.php
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\scheduler\Plugin\Validation\Constraint\SchedulerPublishOnConstraint.
+ */
+
+namespace Drupal\scheduler\Plugin\Validation\Constraint;
+
+use Drupal\Core\Entity\Plugin\Validation\Constraint\CompositeConstraintBase;
+
+/**
+ * Validates publish on values.
+ *
+ * @Constraint(
+ *   id = "SchedulerPublishOn",
+ *   label = @Translation("Scheduler publish on", context = "Validation"),
+ *   type = "entity:node"
+ * )
+ */
+class SchedulerPublishOnConstraint extends CompositeConstraintBase {
+
+  /**
+   * Message shown when publish_on is not the future.
+   *
+   * @var string
+   */
+  public $messageDateNotInFuture = "The 'publish on' date must be in the future.";
+
+  /**
+   * {@inheritdoc}
+   */
+  public function coversFields() {
+    return ['publish_on'];
+  }
+
+}
diff --git a/src/Plugin/Validation/Constraint/SchedulerPublishOnConstraintValidator.php b/src/Plugin/Validation/Constraint/SchedulerPublishOnConstraintValidator.php
index e69de29..7915724 100644
--- a/src/Plugin/Validation/Constraint/SchedulerPublishOnConstraintValidator.php
+++ b/src/Plugin/Validation/Constraint/SchedulerPublishOnConstraintValidator.php
@@ -0,0 +1,30 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\scheduler\Plugin\Validation\Constraint\SchedulerPublishOnConstraintValidator.
+ */
+
+namespace Drupal\scheduler\Plugin\Validation\Constraint;
+
+use Symfony\Component\Validator\Constraint;
+use Symfony\Component\Validator\ConstraintValidator;
+
+/**
+ * Validates the SchedulerPublishOn constraint.
+ */
+class SchedulerPublishOnConstraintValidator extends ConstraintValidator {
+  /**
+   * {@inheritdoc}
+   */
+  public function validate($entity, Constraint $constraint) {
+    $publish_on = $entity->value;
+    $scheduler_publish_past_date = $entity->getEntity()->type->entity->getThirdPartySetting('scheduler', 'publish_past_date');
+
+    if ($publish_on && $scheduler_publish_past_date == 'error' && $publish_on < REQUEST_TIME) {
+      $this->context->buildViolation($constraint->messageDateNotInFuture)
+        ->atPath('publish_on')
+        ->addViolation();
+    }
+  }
+}
