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

Latest commit

 

History

History
37 lines (24 loc) · 673 Bytes

03-rules_is-true.md

File metadata and controls

37 lines (24 loc) · 673 Bytes

IsTrue

Validates that a value is true.

Check the IsFalse rule for a false validation.

IsTrue(
    ?string $message = null
);

Basic Usage

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

Options

message

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

Message that will be shown if the value is true.

The following parameters are available:

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

Changelog

  • 1.3.0 Created