-
Notifications
You must be signed in to change notification settings - Fork 506
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
Add ushahidi/kohana-validation package and use that #1786
Conversation
@willdoran can you review? |
|
||
public function getTranslationCallback() | ||
{ | ||
return function ($file, $field, $error = null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably the ugliest bit. We pass a callback into the KohanaValidation lib for translating messages, and do some wrangling here to connect that to lumen's translator.
@@ -27,8 +26,8 @@ | |||
* @param $validation_factory | |||
* @return void | |||
*/ | |||
public function setValidation(InstanceFactory $validation_factory) | |||
public function setValidation(ValidationEngine $validation_engine) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this was set up so weirdly. Cleaner now
a2a99a7
to
e445c2d
Compare
@rjmackay This is to stablise validation during transition? |
Yup. We need to drop Kohana ASAP, so this just keeps the couple of classes we need in the interrim. |
This replaces the dependencies on Kohana Core. - Update Validators to refer to namespaced Valid and Validation class - Fix DI for ValidationEngineTrait - Set up translations - Move error messages to laravel language files
e445c2d
to
a0f3d2f
Compare
This replaces the dependencies on Kohana Core.
Test checklist:
Refs #1372
Ping @ushahidi/platform