You are here

public static function FormHelper::isValidPriority in Simple XML sitemap 8.2

Same name and namespace in other branches
  1. 8.3 src/Form/FormHelper.php \Drupal\simple_sitemap\Form\FormHelper::isValidPriority()
  2. 4.x src/Form/FormHelper.php \Drupal\simple_sitemap\Form\FormHelper::isValidPriority()

Parameters

string|int $priority:

Return value

bool

1 call to FormHelper::isValidPriority()
SimplesitemapCustomLinksForm::validateForm in src/Form/SimplesitemapCustomLinksForm.php
Form validation handler.

File

src/Form/FormHelper.php, line 473

Class

FormHelper
Class FormHelper @package Drupal\simple_sitemap\Form

Namespace

Drupal\simple_sitemap\Form

Code

public static function isValidPriority($priority) {
  return is_numeric($priority) && $priority >= 0 && $priority <= 1;
}