# |
May 3rd 2019, 11:53 |
martin |
hmm it is a validation error in a relation. That should also be showed there I guess? |
# |
May 3rd 2019, 11:48 |
martin |
I hate errors like this, it has an error during save, but it does not tell what the error is :( |
# |
May 3rd 2019, 11:21 |
noel |
@waspinator thanks for the stackoverflow link.. that’s a self-referencing many-to-one association though, not many-to-many |
# |
May 3rd 2019, 09:14 |
spriz |
Oh well, that will work just fine! Thanks :) |
# |
May 3rd 2019, 09:12 |
spriz |
:cold_sweat: |
# |
May 3rd 2019, 09:12 |
neon1024 |
TIL |
# |
May 3rd 2019, 09:11 |
neon1024 |
> a character symbolizing the idea of a thing without indicating the sounds used to say it. Examples include numerals and Chinese characters. |
# |
May 3rd 2019, 09:11 |
neon1024 |
I wonder what an ‘ideograph’ is :thinking_face: |
# |
May 3rd 2019, 09:11 |
neon1024 |
> matches a letter or ideograph that does not have lowercase and uppercase variants |
# |
May 3rd 2019, 09:10 |
neon1024 |
https://regex101.com/r/b3yYqN/1 |
# |
May 3rd 2019, 09:10 |
neon1024 |
Accents I mean. Geez, perhaps I need a second coffee today! |
# |
May 3rd 2019, 09:10 |
neon1024 |
So it’ll understand `Chloë` |
# |
May 3rd 2019, 09:10 |
neon1024 |
Ahh, it’s using tokens for matching non latins |
# |
May 3rd 2019, 09:09 |
neon1024 |
I can’t understand that one |
# |
May 3rd 2019, 09:09 |
neon1024 |
Yeah, that’s what I said :flushed: |
# |
May 3rd 2019, 09:09 |
spriz |
The regex power is strong is this one |
# |
May 3rd 2019, 09:09 |
spriz |
`/^[\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nd}]+$/Du` :) |
# |
May 3rd 2019, 09:09 |
neon1024 |
,:) |
# |
May 3rd 2019, 09:08 |
spriz |
it is still a thing @neon1024 https://api.cakephp.org/3.7/class-Cake.Validation.Validator.html#_alphaNumeric |
# |
May 3rd 2019, 09:08 |
neon1024 |
As that’s just [\d\w]+ I think |
# |
May 3rd 2019, 09:07 |
neon1024 |
Is that still a rule in 3.7/ |
# |
May 3rd 2019, 09:07 |
neon1024 |
alphaNumeric? |
# |
May 3rd 2019, 09:05 |
spriz |
It sure does - I would do it that way, but whenver I've used regex validation rule before I usually end up finding another rule that would do the job later :) :) |
# |
May 3rd 2019, 09:03 |
Martin` |
some validation with regex maybe? does that exist? |
# |
May 3rd 2019, 09:00 |
spriz |
Hi folks! I have a field on my entity that should not contain whitespaces - is there some sneaky validation rule I should use rather than writing my own? :) : D |
# |
May 3rd 2019, 08:31 |
kgb.acct.personal |
Got it. I'll see for myself |
# |
May 3rd 2019, 08:30 |
neon1024 |
Although do check yourself, and look at the tests and stuff so your ticket doesn’t get insta-closed |
# |
May 3rd 2019, 08:30 |
neon1024 |
Worth opening a ticket about imho though |
# |
May 3rd 2019, 08:30 |
kgb.acct.personal |
That would work around the issue. Thanks. Though, I personally prefer using `?page=2` it is so much easier to read |
# |
May 3rd 2019, 08:30 |
neon1024 |
Perhaps you’ll need to write your own Paginator? Extend the existing one |
# |
May 3rd 2019, 08:30 |
neon1024 |
It does look a bit fixed to me |
# |
May 3rd 2019, 08:30 |
neon1024 |
https://github.com/cakephp/cakephp/blob/master/src/Datasource/Paginator.php#L175-L176 |
# |
May 3rd 2019, 08:28 |
neon1024 |
Simplistically I suppose you could read the value and set the page to that value in your controller, but not ideal |
# |
May 3rd 2019, 08:28 |
neon1024 |
I’ve never liked things like that which intentionally make things more obscure |
# |
May 3rd 2019, 08:27 |
kgb.acct.personal |
Spec want me to use `?p=1` instead of `?page=1` |
# |
May 3rd 2019, 08:26 |
neon1024 |
So probably just change the config, although I’m not sure why you’d want to change it |
# |
May 3rd 2019, 08:26 |
neon1024 |
https://github.com/cakephp/cakephp/blob/master/src/Controller/Component/PaginatorComponent.php#L286 |
# |
May 3rd 2019, 08:24 |
kgb.acct.personal |
Hi. How can I use other query string instead of `?page=` when paginating? |
# |
May 3rd 2019, 08:23 |
neon1024 |
Morning everyone, happy Friday :tada: |
# |
May 3rd 2019, 06:48 |
admad |
using `UsersRepository::class` that is instead of `'App.Users'` |
# |
May 3rd 2019, 06:47 |
admad |
@maymeow the latter makes refactoring easier if required in future |