You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 11, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 11, 2026. It is now read-only.
isValidDate does not check single date values #145
By the way, this check and other like this will fail in the runtime and will lead to error because typescript check types only on compile / development stage -
@rustmn Please go ahead with this is issue #145, I will look into if (!fieldValue) { btw this is a value check / cohesion to a boolean , not a type check (typeof).
Thanks
You expect fieldValue to be a Date object, you check only if it's value is not null / undefined / false, and then interact with it as it were a Date object -
Activity
xenoworkforce commentedon Jun 10, 2021
I can do this.
By the way, this check and other like this will fail in the runtime and will lead to error because typescript check types only on compile / development stage -
react-bare-forms/src/validators.ts
Line 205 in 75966d9
joegasewicz commentedon Jun 11, 2021
@rustmn Please go ahead with this is issue #145, I will look into
if (!fieldValue) {btw this is a value check / cohesion to a boolean , not a type check (typeof).Thanks
xenoworkforce commentedon Jun 11, 2021
@joegasewicz ok, I'm about this -
react-bare-forms/src/validators.ts
Line 203 in 75966d9
You expect fieldValue to be a Date object, you check only if it's value is not null / undefined / false, and then interact with it as it were a Date object -
react-bare-forms/src/validators.ts
Line 216 in 75966d9
Some users may pass an empty object and it will not work as expected, I'll fix it.
joegasewicz commentedon Jun 11, 2021
@rustmn great , go ahead, thanks