src/classes/CCValidator.php
public function message()
	{
		$params = func_get_args();

		$message = array_shift( $params );
		$method = array_shift( $params );

		if ( !$result = $this->validate( $method, $params ) )
		{
			$key = array_shift( $params );

			$params = $this->get_error_message_params( $key, $params );

			// replace the params inside the line
			foreach ( $params as $param => $value ) 
			{
				$message = str_replace( ':'.$param, $value, $message );
			}

			$this->errors[$key][] = $message;
		}

		return $result;
	}
public function message()
	{
		$params = func_get_args();

		$message = array_shift( $params );
		$method = array_shift( $params );

		if ( !$result = $this->validate( $method, $params ) )
		{
			$key = array_shift( $params );

			$params = $this->get_error_message_params( $key, $params );

			// replace the params inside the line
			foreach ( $params as $param => $value ) 
			{
				$message = str_replace( ':'.$param, $value, $message );
			}

			$this->errors[$key][] = $message;
		}

		return $result;
	}
public function message ( ) { $ params = func_get_args ( ) ; $ message = array_shift ( $ params ) ; $ method = array_shift ( $ params ) ; if ( ! $ result = $ this -> validate ( $ method , $ params ) ) { $ key = array_shift ( $ params ) ; $ params = $ this -> get_error_message_params ( $ key , $ params ) ; // replace the params inside the line foreach ( $ params as $ param => $ value ) { $ message = str_replace ( ':' . $ param , $ value , $ message ) ; } $ this -> errors [ $ key ] [ ] = $ message ; } return $ result ; }
Run the validation with a custom message

@param mixed...
@return bool
Run the validation with a custom message