# |
Oct 8th 2016, 15:12 |
mikatone |
nice |
# |
Oct 8th 2016, 15:12 |
mikatone |
ndm ok so custom rule must return something |
# |
Oct 8th 2016, 15:09 |
ndm |
Your _class method_ returns something, but your validation rule _function_ doesn't! |
# |
Oct 8th 2016, 15:07 |
mikatone |
ndm one thing is for sure, is not working! |
# |
Oct 8th 2016, 15:06 |
mikatone |
ndm I've debugged the function _isActive($value) and it is working fine, and yes the function can be passed without array, I just do not get what part is wrong because function is returning the right value according to parameter |
# |
Oct 8th 2016, 15:04 |
ndm |
also the function should most probably not be passed in an array |
# |
Oct 8th 2016, 15:02 |
ndm |
@mikatone Your rule currently "returns" null. You need to return the return value of `$this->_isActive($value)` |
# |
Oct 8th 2016, 15:02 |
mikatone |
anyone available to help? |
# |
Oct 8th 2016, 15:00 |
mikatone |
I'm having a bit of troubles with a custom validation rule not sure what is wrong here https://gist.github.com/anonymous/ae9ed90ebc18a7d6c607bb7756d7e151 |
# |
Oct 8th 2016, 14:11 |
mikatone |
how can i write a custom validation rule to check database for some value ? |
# |
Oct 8th 2016, 13:23 |
bravo-kernel |
thanks, on with it then |
# |
Oct 8th 2016, 13:23 |
bravo-kernel |
great, at least I was right about that |
# |
Oct 8th 2016, 13:21 |
admad |
that's the only way |
# |
Oct 8th 2016, 13:20 |
bravo-kernel |
would it work like including the ErrorController and CustomRoute in the crud plugin and then document how to set up the app? |
# |
Oct 8th 2016, 13:19 |
bravo-kernel |
I have been wondering about something similar for the custom route that will probably be needed |
# |
Oct 8th 2016, 13:19 |
bravo-kernel |
ok, I see |
# |
Oct 8th 2016, 13:18 |
admad |
if ErrorController exists in your app it will be automatically be used |
# |
Oct 8th 2016, 13:18 |
bravo-kernel |
:dancer: |
# |
Oct 8th 2016, 13:17 |
bravo-kernel |
thanks |
# |
Oct 8th 2016, 13:17 |
bravo-kernel |
haha |
# |
Oct 8th 2016, 13:17 |
bravo-kernel |
aha, f** me, how obvious |
# |
Oct 8th 2016, 13:17 |
admad |
you will have to use a custom error controller |
# |
Oct 8th 2016, 13:17 |
bravo-kernel |
useful for making your API respond exactly how you want to but... not for the errors atm hence my question |
# |
Oct 8th 2016, 13:16 |
bravo-kernel |
it might but I have implemented support for all built-in constants |
# |
Oct 8th 2016, 13:15 |
admad |
iirc exceptionrender automatically pretty prints json responses if debug is on |
# |
Oct 8th 2016, 13:14 |
bravo-kernel |
I would like to use `jsonOptions` configured for the listener to be available/used in the ExceptionRenderer. For pretty print ,etc |
# |
Oct 8th 2016, 13:12 |
admad |
what exactly are you trying to achieve? |
# |
Oct 8th 2016, 13:12 |
admad |
you can't since a new ErroController instance is used by exceptionrender |
# |
Oct 8th 2016, 13:04 |
bravo-kernel |
Any way I make a controller variable available in ExceptionRenderer? It seems all information is lost when the ErrorController is created |
# |
Oct 8th 2016, 11:31 |
slackebot |
~tell jsparks about api |
# |
Oct 8th 2016, 11:31 |
slackebot |
Command sent from Slack by admad: |
# |
Oct 8th 2016, 11:28 |
jsparks |
can I filter by field with get method? |
# |
Oct 8th 2016, 11:13 |
jsparks |
what valid options can i pass in get method? |
# |
Oct 8th 2016, 11:10 |
jsparks |
hi can i pass where option in get method? |
# |
Oct 8th 2016, 09:55 |
bravo-kernel |
s |
# |
Oct 8th 2016, 09:55 |
bravo-kernel |
thank |
# |
Oct 8th 2016, 09:55 |
bravo-kernel |
ok |
# |
Oct 8th 2016, 09:55 |
lorenzo |
same as with the core, it will log if you have the log setting enabled |
# |
Oct 8th 2016, 09:55 |
lorenzo |
it is intentional |
# |
Oct 8th 2016, 09:55 |
bravo-kernel |
Is that intentional, I only see a method to get the queryLogs for debug modewhe |
# |
Oct 8th 2016, 09:53 |
bravo-kernel |
@lorenzo question about Crud's QueryLogListener if I may. I noticed this function is always executed if the listener is enabled, regardless of debug-mode. https://github.com/FriendsOfCake/crud/blob/master/src/Listener/ApiQueryLogListener.php#L48 |