# |
Oct 18th 2019, 06:35 |
alexdd55976 |
thanks, you too |
# |
Oct 18th 2019, 06:18 |
conehead |
wish you a good friday morning alex :slightly_smiling_face: |
# |
Oct 18th 2019, 06:15 |
alexdd55976 |
morning |
# |
Oct 18th 2019, 02:54 |
francis.nadal |
Thank you @phantomwatson! I will take a look when I get in the office hehe |
# |
Oct 17th 2019, 23:24 |
dereuromark |
jep jep: https://github.com/dereuromark/cakephp-ide-helper/pull/147/files#diff-4d6ceddef15d34ac6842caff998da528R51 fixed the false positives in the process. |
# |
Oct 17th 2019, 22:19 |
dereuromark |
I think my ide helper also autocompletes using the former, but I would have to check. in case you are using it you could more quickly confirm it :slightly_smiling_face: |
# |
Oct 17th 2019, 22:13 |
coreus |
Yeah, figured. I guess stick with `camelCase` for conciseness. |
# |
Oct 17th 2019, 22:13 |
ndm |
Personally I'm using the former, looks nicer imho. |
# |
Oct 17th 2019, 22:10 |
ndm |
Doesn't matter as in PHP method names are case insensitive, `sOmEqUaLiFiEr` would work as well... |
# |
Oct 17th 2019, 22:05 |
coreus |
while CakePHP supports both, should custom finders when addressed by camelCase with or UpperCamelCase? I.e: `->find('recentGamesInSeason') vs ->find('RecentGamesInSeason' ` |
# |
Oct 17th 2019, 20:18 |
bertinmendoza4 |
Reply |
# |
Oct 17th 2019, 20:17 |
alpha |
testing |
# |
Oct 17th 2019, 19:30 |
dereuromark |
jep |
# |
Oct 17th 2019, 19:29 |
admad |
@dereuromark true, if it's a collection need to use ->isEmpty() on it |
# |
Oct 17th 2019, 19:11 |
myappinterviews |
What's up @bertinmendoza4 |
# |
Oct 17th 2019, 19:11 |
bertinmendoza4 |
Hey @myappinterviews |
# |
Oct 17th 2019, 18:45 |
phantomwatson |
And it's worth noting that `provider()` has been deprecated in favor of `getProvider()` and `setProvider()`. |
# |
Oct 17th 2019, 18:44 |
phantomwatson |
@francis.nadal, I think that would be in the relevant table's `validationDefault()` method. |
# |
Oct 17th 2019, 17:35 |
francis.nadal |
Hi its me again, currently studying the cakephp-upload plugin. I wanted to implement its validation as per documentation https://cakephp-upload.readthedocs.io/en/latest/validation.html but I seem to not understand where to put these. Thank you in advance for any help. |
# |
Oct 17th 2019, 17:02 |
dereuromark |
collections if object collection, for array it is clear |
# |
Oct 17th 2019, 17:02 |
dereuromark |
true as in !empty() returns true here |
# |
Oct 17th 2019, 17:02 |
dereuromark |
@admad wouldnt a collection return true on empty (count 0) for this? |
# |
Oct 17th 2019, 16:43 |
admad |
@neon1024 what's wrong with simply `!empty($company->websites)` ? |
# |
Oct 17th 2019, 16:42 |
dereuromark |
In general, no app should ever go live without this component or sth similar on middleware activated, as it is basically a recipe for desaster if you trust your validation rules to work ;) |
# |
Oct 17th 2019, 16:42 |
dereuromark |
You just need to be a bit more precise in your questions :slightly_smiling_face: It is about payload trimming your case it seems. |
# |
Oct 17th 2019, 16:38 |
felipe.marinho |
Thank you @dereuromark :pray: |
# |
Oct 17th 2019, 16:33 |
dereuromark |
https://github.com/dereuromark/cakephp-tools/blob/master/docs/Component/Common.md#trimming-payload-data |
# |
Oct 17th 2019, 16:33 |
dereuromark |
read my blog posts :P that things exists for 9+ years in tools plugin for free. |
# |
Oct 17th 2019, 16:06 |
felipe.marinho |
I create selects (with all the possible values for that database field) AND input text to create new values for that field... but the users are creating/typing values using the input text with trailing spaces... |
# |
Oct 17th 2019, 16:02 |
neon1024 |
As it sounds like input sanitisation |
# |
Oct 17th 2019, 16:02 |
neon1024 |
Tell us instead, what you’re actually trying to do |
# |
Oct 17th 2019, 16:02 |
slackebot1 |
!xy |
# |
Oct 17th 2019, 16:02 |
slackebot1 |
Command sent from Slack by neon1024: |
# |
Oct 17th 2019, 16:02 |
neon1024 |
This is |
# |
Oct 17th 2019, 16:02 |
felipe.marinho |
I have so many fields to do that :,( |
# |
Oct 17th 2019, 16:02 |
neon1024 |
Or `ltrim()` `rtrim()` |
# |
Oct 17th 2019, 16:02 |
neon1024 |
Or `preg_replace()` |
# |
Oct 17th 2019, 16:02 |
neon1024 |
Or `str_replace()` |
# |
Oct 17th 2019, 16:01 |
neon1024 |
Do.. do you mean.. the php function `trim()~ |
# |
Oct 17th 2019, 16:01 |
felipe.marinho |
Hello, there's any plugin to trim spaces in strings? :thinking_face: |
# |
Oct 17th 2019, 15:59 |
neon1024 |
I thought Collection::firstMatch |