1.14.0
What's changed
-
Custom validation rules under the
Bluewing\Rules
namespace can now use the traitBluewing\Rules\Support\HasCustomizableMessages
to expose functionality to the consumer to modify the returned error message if the validation rule fails, using thewithCustomMessage
method, which fluently returns the modifiedRule
object. -
Both
Bluewing\Rules\MissingInTenancy
andBluewing\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') ] ];