public static Datelist::validateDatelist(&$element, FormStateInterface $form_state, &$complete_form)
Validation callback for a datelist element.
If the date is valid, the date object created from the user input is set in the form for use by the caller. The work of compiling the user input back into a date object is handled by the value callback, so we can use it here. We also have the raw input available for validation testing.
Parameters
array $element: The element being processed.
\D