public static function validate(array $inputs, array $rules = [], array $messages = [])
    {
        /** @var \Rakit\Validation\Validation $validation */
        $validation = Container::get('Rakit\Validation\Validator')->validate($inputs, $rules, $messages);

        if ($validation->fails()) {
            return $validation->errors()->toArray();
        }

        return true;
    }
public static function validate(array $inputs, array $rules = [], array $messages = [])
    {
        /** @var \Rakit\Validation\Validation $validation */
        $validation = Container::get('Rakit\Validation\Validator')->validate($inputs, $rules, $messages);

        if ($validation->fails()) {
            return $validation->errors()->toArray();
        }

        return true;
    }
public static function validate ( array $ inputs , array $ rules = [ ] , array $ messages = [ ] ) { /** @var \Rakit\Validation\Validation $validation */ $ validation = Container :: get ( 'Rakit\Validation\Validator' ) -> validate ( $ inputs , $ rules , $ messages ) ; if ( $ validation -> fails ( ) ) { return $ validation -> errors ( ) -> toArray ( ) ; } return true ; }
Manually validate any given array.

@param  array $inputs   The array of data to validate as key value pairs.
@param  array $rules    The rules to run against the data.
@param  array $messages Messages to display when a value fails.
@return bool|array Returns true if data validates, or an array of error messages.
Manually validate any given array .