src/Validate.php
public static function registerCustomType($type, $callback)
    {
        if (!is_callable($callback)) {
            throw new \Exception(__('callback_is_not_function_exception'));
        }

        self::$custom_types[$type]= ['callback' => $callback];
    }
public static function registerCustomType($type, $callback)
    {
        if (!is_callable($callback)) {
            throw new \Exception(__('callback_is_not_function_exception'));
        }

        self::$custom_types[$type]= ['callback' => $callback];
    }
public static function registerCustomType ( $ type , $ callback ) { if ( ! is_callable ( $ callback ) ) { throw new \ Exception ( __ ( 'callback_is_not_function_exception' ) ) ; } self :: $ custom_types [ $ type ] = [ 'callback' => $ callback ] ; }
Register a custom data type

It can be used to validate models
@param string $type
@param function $callback
@throws \Exception
Register a custom data type