You are here

public static function DateRecurRRule::validateRule in Recurring Dates Field 8

Validate that an rrule string is parseable.

Parameters

string $rrule:

\DateTime|DrupalDateTime $startDate:

Return value

bool

Throws

\InvalidArgumentException

1 call to DateRecurRRule::validateRule()
DateRecurDefaultWidget::validateRrule in src/Plugin/Field/FieldWidget/DateRecurDefaultWidget.php
#element_validate callback to validate the repeat rule.

File

src/DateRecurRRule.php, line 188

Class

DateRecurRRule

Namespace

Drupal\date_recur

Code

public static function validateRule($rrule, $startDate) {
  $rule = new self($rrule, $startDate);
  return TRUE;
}