# |
May 27th 2016, 08:44 |
patsToms |
thanks |
# |
May 27th 2016, 08:43 |
fquffio |
See: http://book.cakephp.org/3.0/en/core-libraries/validation.html#conditional-validation |
# |
May 27th 2016, 08:43 |
fquffio |
patsToms: i'm not sure I have understood what you need, but if you need at least one of them to be filled, you could use conditional validation rules: add `notEmpty` rule to each field with a conditional check that returns `true` iff (= if and only if) the other two are empty. |
# |
May 27th 2016, 08:36 |
patsToms |
is there any way how to require of the fields with validator? For example I have three fields - I want to one of the filled. |
# |
May 27th 2016, 08:32 |
Neon1024x |
Although I'm not sure it'll take a file, you might need to base64() the file or something so you can get a string |
# |
May 27th 2016, 08:32 |
Neon1024x |
dariolap, Did you try hash() ? |
# |
May 27th 2016, 08:31 |
dariolap |
In 3.x there is a function to get hash of file? |
# |
May 27th 2016, 08:25 |
Neon1024x |
Isn't that just an index constraint in the db schema? |
# |
May 27th 2016, 08:22 |
ionas |
how can I make a constraint where unique (name, parent_id) would fail in case of a name: foo, parent_id: null being inserted twice? |
# |
May 27th 2016, 08:18 |
birdy247 |
lol |
# |
May 27th 2016, 08:17 |
neon1024 |
You're a triathelete, get yerself into the Thames with your running shoes |
# |
May 27th 2016, 08:13 |
birdy247 |
really wish I was there :( |
# |
May 27th 2016, 08:13 |
birdy247 |
@neon1024: that looks meannnn |
# |
May 27th 2016, 08:12 |
Liquidedust |
Though whomever thought it was a good idea to go out for a "few" beers yesterday, I silently detest and like you at the same time |
# |
May 27th 2016, 08:10 |
dakota |
canâ??t give any comment on itâ??s quality though |
# |
May 27th 2016, 08:10 |
neon1024 |
Dangerous! ;) |
# |
May 27th 2016, 08:10 |
dakota |
The lidl down the street has stroopwafel |
# |
May 27th 2016, 08:10 |
neon1024 |
https://untappd.com/b/brouwerij-t-ij-flink/529499 |
# |
May 27th 2016, 08:09 |
neon1024 |
The local Flink beer is nice though |
# |
May 27th 2016, 08:09 |
neon1024 |
Not found any stroopwafel yet :( |
# |
May 27th 2016, 08:08 |
spriz |
Nah, you canâ??t drink before 10am if youâ??ve slept! :P |
# |
May 27th 2016, 08:08 |
admad |
nah that's yesterday |
# |
May 27th 2016, 08:08 |
Liquidedust |
does beer 3 in the morning before bed count as today? |
# |
May 27th 2016, 08:08 |
neon1024 |
It's not even 10am! |
# |
May 27th 2016, 08:08 |
spriz |
Oh, howâ??s Cakefest?! :) Any blog posts about it yet? :) |
# |
May 27th 2016, 08:07 |
birdy247 |
most importantly, have you consumed any beers yet |
# |
May 27th 2016, 08:07 |
spriz |
okay :slightly_smiling_face: Damn.. thatâ??s also how Iâ??ve done it before :S |
# |
May 27th 2016, 08:07 |
neon1024 |
Morning birdy247 |
# |
May 27th 2016, 08:07 |
birdy247 |
caked fested up |
# |
May 27th 2016, 08:07 |
neon1024 |
Yeps |
# |
May 27th 2016, 08:07 |
spriz |
eg load it in the AppController and use those settings across user/admin controllers |
# |
May 27th 2016, 08:07 |
birdy247 |
@neon1024: morning |
# |
May 27th 2016, 08:07 |
neon1024 |
I have a different auth adapter for my api |
# |
May 27th 2016, 08:07 |
spriz |
Yeah, that was what I meant with â??same settings" |
# |
May 27th 2016, 08:07 |
neon1024 |
No, just use the 1 AuthComponent implementation |
# |
May 27th 2016, 08:06 |
spriz |
okay, so you load the samme settings in terms of the Auth component and use them across both user/admin controllers? |
# |
May 27th 2016, 08:06 |
spriz |
In my case, the â??userâ? facing part is only registering/managing your user, and then what is â??usableâ? is a REST api |
# |
May 27th 2016, 08:06 |
neon1024 |
Just have Auth as normal in AppController |
# |
May 27th 2016, 08:05 |
spriz |
damn, didnâ??t see your message neon1024 :P But! When youâ??re doing your admin controllers and using prefix, how are you handling authorisation? |
# |
May 27th 2016, 08:00 |
unholyknight |
any ideas? |
# |
May 27th 2016, 08:00 |
unholyknight |
i have a behavior running on beforeRules which are operations needed before validation rules are digested, but it either doesnâ??t get called or is failing validation before reaching the behavior. |