Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

9.6.0 #619

Merged
merged 10 commits into from
Dec 4, 2024
Merged

9.6.0 #619

merged 10 commits into from
Dec 4, 2024

Conversation

binaryk
Copy link
Collaborator

@binaryk binaryk commented Dec 4, 2024

Added

add defaultCallback method

Copy link

what-the-diff bot commented Dec 4, 2024

PR Summary

  • Introduction of "Default Stored Value" Section
    A new section called "Default Stored Value" has been added to fields.md, it will help users understand how to set default values for fields using either a callback or value.

  • New Property fillDefaultCallback
    A new property named fillDefaultCallback has been included in Field.php, it's designed to store the callback which returns the default value.

  • New Method defaultCallback
    The Field.php file now has a new method named defaultCallback. This method accepts either a callable function or a value to be used as a default.

  • Changes to fillAttribute Method
    The fillAttribute method in Field.php has been updated to use the newly introduced method fillAttributeFromDefault. This change should improve the assignment of default values.

  • Adding fillAttributeFromDefault Method
    A new method fillAttributeFromDefault has been created in Field.php, allowing for default values to be assigned to an attribute that is not yet set.

  • Refactoring of Validation Rules in File.php
    Modification to the validation rules in File.php has been refactored to use the helper function named str() for string checks. This refinement should improve the process of conducting string validations.

@binaryk binaryk merged commit b15e3f6 into 9.x Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant