I have a really strange problem. I have model attribute rules that specify a date format for ‘start_at’ and ‘end_at’ in one of my models. It looks like this…
In a Unix environment it works perfectly fine given a date of ‘2016-06-11 16:30:00’. However, in a windows environment I get an error saying “The format of Start At is invalid” and “The format of End At is invalid”. I checked the date string in both Linux and Windows and they are exactly the same.
Why would this validator work differently in a Linux host as opposed to Windows host and how do I fix it?
Thanks for the suggestion Patrick but neither of these worked. I still get validation error. It works perfectly fine in my LAMP stack but not in my WAMP stack.
Yes, using xdebug I set a break-point and checked the values. It was in this format, “2016-06-11 16:30:00”. For some reason the validator didn’t like that in my Windows environment. I had to remove the date validation to get it to work on my WAMP stack. Again, in my Linux environment it worked fine.