Closed maicol07 closed 1 year ago
Please fix tests and add a unit test that covers this functionality.
Thank you!
@binaryk done! However, I don't know where to add a test for this methods (related to rules)
Thank you for your contribution, however at this point we cannot merge PR's without tests.
More than that, the fluent API should follow the Laravel Nova way, using that method to overwrite rules doesn't feels natural.
@binaryk I'll redo the PR with just the fix for the issue without overriding anything
The new PR is this one: #575
PR Summary
Enhanced Documentation for Rule Overwriting A section was added to the
fields.md
document to guide users on how to overwrite or reset rules. This includes a practical example to aid understanding.Expanded Flexibility of Rules Handling In the
Field.php
file:rules
method has been modified to now accept multiple rule arguments instead of just one, offering a more dynamic experience.overwriteRules
, has been introduced. This enables the replacement of current rules with new ones.required
method has been revised to append the 'required' rule instead of simply assigning it, ensuring the preexisting rules are not overwritten.