Nova provides a variety of ways to validate your resource fields.
rules
method to attach validation rules to the field:
rules
method via an array or Closure:
creationRules
method:
updateRules
method. If necessary, you may use resourceId
place-holder within your rule definition. This place-holder will automatically be replaced with the primary key of the resource being updated:
afterValidation
MethodafterValidation
method will always be called after a resource has been validated during its creation or during an update. This method will be called before calling afterCreationValidation
or afterUpdateValidation
:
afterCreationValidation
MethodafterCreationValidation
method will be called after a resource that is being created has been validated:
afterUpdateValidation
MethodafterUpdateValidation
method will be called after a resource that is being updated has been validated: