$this->validator->getValidated() looks stupid and unnecessary |
(10-09-2023, 09:21 AM)sammyskills Wrote: Feel free to send a PR! I wish I could! but I dont thing I have a good hang of the framework inside out. (10-09-2023, 01:52 PM)kenjis Wrote:I wish I could man. But if youi were not being able to fix that method, I sure I wont be able too. You are much more capable than me(10-09-2023, 04:48 AM)MrWhite Wrote: If the $this->validate() method working fine then why we need this new method? if $this->validate() returns true then we can be sure about the submitted data. ![]() (10-09-2023, 01:56 PM)kenjis Wrote:(10-09-2023, 08:35 AM)MrWhite Wrote: And we do it intentionally sometimes, because there are some situations that we dont want some fields to be validated. As a example, lets say we have a optional checkbox. we dont care about it's value or whether its submitted or not. We only care about if that checkbox in the submitted data array or not. for that kind of situations I dont feels like add validation. (10-09-2023, 02:01 PM)kenjis Wrote: A simple solution is to use $this->validateData() instead of $this->validate(). Thanks I will use validateData() method instead validate() method. This reply was very helpfull. (10-09-2023, 02:04 PM)kenjis Wrote: @MrWhite Does the following note in the User Guide answer your question? It could be better if this description highlight the validateData() method. Thanks for the all hardwork @kenjis appreciate that. |
Welcome Guest, Not a member yet? Register Sign In |