# |
Dec 4th 2017, 12:42 |
casmo |
Hey Admad, is there a reason why the domein .co returns false on email validation? e.g. test@domain.co ? |
# |
Dec 4th 2017, 12:42 |
obinoob9 |
hmic each phone / emails go through validator one at a time meaning all phones / emails are filtered by same rules what i only need the first phone or email to be required or filtered by some specific rule I can't use a custom validator because that would affect all phones/emails in same way right? |
# |
Dec 4th 2017, 12:41 |
happy |
ok, thanks @admad :thumbsup: |
# |
Dec 4th 2017, 12:41 |
admad |
@happy it does a select count() each time |
# |
Dec 4th 2017, 12:36 |
inoas |
hmic: ll be back later but you pointed in the right direction anyway, no need to let it hit cakephp at all |
# |
Dec 4th 2017, 12:34 |
happy |
Does anyone know if the CounterCache behaviour just +/-1 each time or does it run a SELECT COUNT() statement eachtime? |
# |
Dec 4th 2017, 12:33 |
obinoob9 |
*is |
# |
Dec 4th 2017, 12:32 |
obinoob9 |
the update if fixed ;) |
# |
Dec 4th 2017, 12:29 |
hmic |
if not - why not add the markup and render the control without the inputcontainer by setting div => false in the options array? |
# |
Dec 4th 2017, 12:28 |
hmic |
you cant set the inputcontainer/template on the control itself? |
# |
Dec 4th 2017, 12:27 |
neon1024 |
Yeah this sucks, https://pastebin.com/FJ7yKj0G |
# |
Dec 4th 2017, 12:27 |
hmic |
does not work without the associated ids - and an id for your client record too of course! |
# |
Dec 4th 2017, 12:26 |
obinoob9 |
edit |
# |
Dec 4th 2017, 12:26 |
obinoob9 |
yeah ! |
# |
Dec 4th 2017, 12:26 |
hmic |
or are you talking about an add now, no edit? |
# |
Dec 4th 2017, 12:26 |
hmic |
obinoob9, i still cant see no primary keys in this data |
# |
Dec 4th 2017, 12:24 |
obinoob9 |
hmic https://gist.github.com/obinoob/48197cc1ab9fc3b8cd378cbe9b48b91d |
# |
Dec 4th 2017, 12:23 |
obinoob9 |
hmic but accorading to this https://book.cakephp.org/3.0/en/views/helpers/form.html#associated-form-inputs my template is right and debug $this request seems fine to me |
# |
Dec 4th 2017, 12:22 |
neon1024 |
Urgh, such a faff for a simple thing :( |
# |
Dec 4th 2017, 12:21 |
hmic |
neon1024: i'd say so, yes. you can supply that template with the controls options array |
# |
Dec 4th 2017, 12:20 |
neon1024 |
How do I go about applying a css class to the wrapping div for JUST A SINGLE input? Do I need to change the temmplate for that one input? |
# |
Dec 4th 2017, 12:20 |
obinoob9 |
they are not get marshalled |
# |
Dec 4th 2017, 12:20 |
hmic |
your post data is not looking like cake expects it. cannot be processed/patched into entities for this reason |
# |
Dec 4th 2017, 12:20 |
hmic |
which means what to you? |
# |
Dec 4th 2017, 12:19 |
obinoob9 |
hmic after submit those get empty |
# |
Dec 4th 2017, 12:19 |
hmic |
and actually, there is no data in those entities |
# |
Dec 4th 2017, 12:19 |
obinoob9 |
hmic why it is set to new if I'm updating? |
# |
Dec 4th 2017, 12:18 |
hmic |
obinoob9, your entity is set to new, so the validation is correct |
# |
Dec 4th 2017, 12:16 |
casmo |
Are you talking to me>? |
# |
Dec 4th 2017, 12:15 |
obinoob9 |
it doens't mean nothing mail rules are only gonna match for mail structure and that mail respects the rules |
# |
Dec 4th 2017, 12:14 |
obinoob9 |
lol it was entered before and passed the same validation rules |
# |
Dec 4th 2017, 12:13 |
casmo |
.co domain is a valid top-level extention |
# |
Dec 4th 2017, 12:13 |
obinoob9 |
yes it does but why if I've not changed the field ? |
# |
Dec 4th 2017, 12:12 |
casmo |
Validation rule 'email' gives a false on 'test@domain.co' |
# |
Dec 4th 2017, 12:10 |
obinoob9 |
hmic I've debugged the $client before submit and after submit https://gist.github.com/obinoob/de8b3cf7c2923e810db01368b1e47572 |
# |
Dec 4th 2017, 12:03 |
obinoob9 |
hmic I guess I have but I also know learned a lot in the process and thank you for your help ;) but still not working and I've noticed the same behaviour |
# |
Dec 4th 2017, 11:48 |
hmic |
not just the requirement in this case :/ |
# |
Dec 4th 2017, 11:48 |
hmic |
you missed the whole concept probably |
# |
Dec 4th 2017, 11:45 |
obinoob |
I have read the section form for associations can believe I missed that |
# |
Dec 4th 2017, 11:44 |
hmic |
cake cannot and will not identify an existing record for updating it, if you dont provide the primary key with it. |
# |
Dec 4th 2017, 11:43 |
hmic |
might be more, but these are missing at least. |