system/src/Grav/Framework/Form/Traits/FormTrait.php
/**
     * Validate data and throw validation exceptions if validation fails.
     *
     * @param \ArrayAccess $data
     * @throws ValidationException
     * @throws \Exception
     */
Validate data and throw validation exceptions if validation fails.
@param \ArrayAccess $data
@throws ValidationException
@throws \Exception
Validate data and throw validation exceptions if validation fails . @param \ ArrayAccess $data @throws ValidationException @throws \ Exception
protected function validateData(\ArrayAccess $data): void
    {
        if ($data instanceof Data) {
            $data->validate();
        }
    }
protected function validateData ( \ ArrayAccess $ data ) : void { if ( $ data instanceof Data ) { $ data -> validate ( ) ; } }
Validate data and throw validation exceptions if validation fails.
Validate data and throw validation exceptions if validation fails .