Or, you may need two fields to have a given value only when another field is present.

validating date field-31validating date field-85validating date field-28

For example, perhaps they run a game resale shop, or maybe they just enjoy collecting.

To conditionally add this requirement, we can use the Laravel provides a variety of helpful validation rules; however, you may wish to specify some of your own.

Is there a built in way to access the full, current datetime with the correct time?

If not, what would be the simplest way to format the Current Date and Time reference fields so that they can be compared to another datetime field using a Boolean function (in this case, greater than or less than).

This message should be placed in the first level of the array, not within the When creating a custom validation rule, you may sometimes need to define custom place-holder replacements for error messages.

I need to compare the current datetime to a datetime field on my Nintex form for validation purposes.

First, let's assume we have the following routes defined in our object.

If the validation rules pass, your code will keep executing normally; however, if validation fails, an exception will be thrown and the proper error response will automatically be sent back to the user.

trait which provides a convenient method to validate incoming HTTP request with a variety of powerful validation rules.

To learn about Laravel's powerful validation features, let's look at a complete example of validating a form and displaying the error messages back to the user.

@whitej71 In the example you gave, it is correctly returning false.