skip to Main Content

Date validation with another fields in controller in Laravel

Here is my validation code in the controller $eldate = Carbon::now()->addDay(4)->format('Y-m-d'); $validatedData = $this->validate($request, [ 'ldate' => 'required|date|unique:leaves,ldate,NULL,employee,employee,'.auth()->id(), 'ldate2' => 'nullable|date|after_or_equal:ldate', 'type' => 'required' ]); In this validation code I have to add one more condition for date1 If type…

VIEW QUESTION

Android studio name validation

I'm comming with a little question here. I need to do something to validate the a name in the registration form, until now I did this : if(TextUtils.isEmpty(textFullName) ) and this else if(!textFullName.matches("[a-zA-Z ]+")) but those are for empty and…

VIEW QUESTION

What can I do to improve my writing?

In my react with typescript project, I'm using the Formik component alongside Yup validation schema to validate an address form. At the moment, it work fine for an existing user, because the initialValues are populated with valid data. Also, it…

VIEW QUESTION
Back To Top
Search