Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Files

Latest commit

 

History

History
36 lines (23 loc) · 643 Bytes

03-rules_not-null.md

File metadata and controls

36 lines (23 loc) · 643 Bytes

NotNull

Validates that a value is not null.

Check the IsNull rule for the opposite validation.

NotNull(
    ?string $message = null
);

Basic Usage

// anything else will be true
Validator::notNull()->validate(null); // false

Options

message

type: ?string default: The {{ name }} value should not be null.

Message that will be shown if the value is not null.

The following parameters are available:

Parameter Description
{{ name }} Name of the invalid value

Changelog

  • 1.3.0 Created