src/php/Validator.php
public function validateDescription($event)
    {
        if (!is_string($event)
            || strlen($event) > 10000
            || strlen($event) < 1
        ) {
            throw new InvalidArgumentException(
                'Event description must be a non empty string of at most ' .
                '10,000 characters',
                400
            );
        }

        return $this;
    }
public function validateDescription($event)
    {
        if (!is_string($event)
            || strlen($event) > 10000
            || strlen($event) < 1
        ) {
            throw new InvalidArgumentException(
                'Event description must be a non empty string of at most ' .
                '10,000 characters',
                400
            );
        }

        return $this;
    }
public function validateDescription ( $ event ) { if ( ! is_string ( $ event ) || strlen ( $ event ) > 10000 || strlen ( $ event ) < 1 ) { throw new InvalidArgumentException ( 'Event description must be a non empty string of at most ' . '10,000 characters' , 400 ) ; } return $ this ; }
Validates the given event description.

@param string $event Event description.

@return $this

@throws InvalidArgumentException Thrown if the event description is invalid.
Validates the given event description .