Skip to content

1.14.0

Compare
Choose a tag to compare
@lukeify lukeify released this 10 Sep 10:18
· 17 commits to master since this release

What's changed

  • Custom validation rules under the Bluewing\Rules namespace can now use the trait Bluewing\Rules\Support\HasCustomizableMessages to expose functionality to the consumer to modify the returned error message if the validation rule fails, using the withCustomMessage method, which fluently returns the modified Rule object.

  • Both Bluewing\Rules\MissingInTenancy and Bluewing\Rules\ExistsInTenancy now have static constructors and instance methods that more fluently build the respective rule objects. For example:

    // Previously: new MissingInTenancy('Departments', 'name')
    $rules = [
        'name' => [
            MissingInTenancy::inTable('Departments')→forColumn('name')
        ]
    ];