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

Adding method validations option #1

Merged
merged 2 commits into from
Apr 21, 2018
Merged

Adding method validations option #1

merged 2 commits into from
Apr 21, 2018

Conversation

marcotas
Copy link
Contributor

This method can be optionally used instead of the property validations for better use with custom rules. Example usage:

class CreatePhoneInteraction extends Interaction
{
    public function validations()
    {
        return [
            'phone' => ['required', new MyPhoneRule('BR')],
        ];
    }
}

This method can be used instead of the property `validations` for better use with custom rules.
@zachflower
Copy link
Owner

This is great, thanks @Marcot89! Would you mind adding a test to validate the new functionality?

@marcodevsquad
Copy link

It's done. 😉 👍

@marcodevsquad
Copy link

@zachflower where are you? I'm waiting your answer... thanks

Copy link
Owner

@zachflower zachflower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the delay @Marcot89, this all looks great! Thank you so much for the contribution!

@zachflower zachflower merged commit 65d434b into zachflower:master Apr 21, 2018
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.

3 participants