Any fields that are displayed on the Lamotivo creation or update forms will need some validation. Lamotivo uses the internal Laravel validation rules.

Attaching Rules

When defining a field on a resource, you may use the rules method to attach validation rules to the field:


Alternatively, validation rules may be specified as arrays of rules instead of a single string:


Custom Error Messages

Lamotivo uses the default error messages for validation. If you need, you may use the messages method to define custom error messages:

        'required' => 'You should provide a value',