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
This is the validation i added
// Check if the year starts with a hyphen
if (fullYear.startsWith('-')) {
return false; // Hyphen before year is not allowed
}
The date is validated when the date is clearly not valid. You can put hyphen in the beginning of a date and it is treated as the right format.
Expected behavior
"-2012" not valid
Actual behavior
"-2012" valid
The text was updated successfully, but these errors were encountered: