techouse / intl-date-time

International DateTime for Laravel Nova
MIT License
57 stars 21 forks source link

border-danger is missing when validation fails #32

Closed hcancelik closed 4 years ago

hcancelik commented 4 years ago

Thanks for the package.

It looks like border-danger class is missing when the field validation fails.

image

techouse commented 4 years ago

Hmm, sorry but I can't reproduce your issue. I correctly get the border-danger class.

Screenshot 2020-07-14 at 19 31 48
hcancelik commented 4 years ago

@techouse

I have tested again on a brand new Nova installation (v.3.7.1) and still not working. Also noticed that ->required() doesn't even trigger any errors.

It looks like you have a custom validation that triggers onBlur to check the date format. However, the validation rules from Nova doesn't get triggered(->required()) or missing the class I mentioned.

techouse commented 4 years ago

Fixed.

This wasn't so much a border or class issue. I had somehow forgotten to even use the required attribute altogether. 🤷‍♂️

https://github.com/techouse/intl-date-time/blob/master/resources/js/components/IntlDateTimePicker.vue#L11

hcancelik commented 4 years ago

@techouse Thanks for the responses. I just updated to v1.5.10 and all IntDateTime fields are now invisible :(

Never mind. Had to do hard reload.

techouse commented 4 years ago

🤣 glad it works 👍