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

Third argument '$param' missing in validation getErrorMessage #589

Closed
bytedevzone opened this issue Jul 6, 2017 · 2 comments
Closed

Third argument '$param' missing in validation getErrorMessage #589

bytedevzone opened this issue Jul 6, 2017 · 2 comments

Comments

@bytedevzone
Copy link

https://github.com/bcit-ci/CodeIgniter4/blob/develop/system/Validation/Validation.php#L245

Missing $param argument in getErrorMessage

Update:
$this->getErrorMessage($rule, $field, $param);

@jim-parry
Copy link
Contributor

The getErrorMessage signature provides a default value for the third parameter...

getErrorMessage(string $rule, string $field, string $param = null)

How is this a problem?

@bytedevzone
Copy link
Author

When I add validation rule 'min_length' (set 5) for a filed with name 'name',
return error with message 'The name field must be at least characters in length.'

By passing third argument '$param'
in https://github.com/bcit-ci/CodeIgniter4/blob/develop/system/Validation/Validation.php#L237
message shown 'The name field must be at least 5 characters in length.'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants