{"version":"1.0","type":"rich","title":"Validate date in JavaScript (dd/mm/yyyy format)","description":"This example demonstrates a client-side JavaScript function that validates a date entered in dd/mm/yyyy format within an HTML form. It reads the value from an input field via `document.getElementById`, splits it into day, month, and year components using `parseInt`, and checks for numeric values, positive ranges, month limits, and day counts per month. The validation accounts for leap years by checking divisibility by 4 and uses a hardcoded `daysPerMonth` array to enforce maximum days. It returns `false` and displays an `alert` with an error message when validation fails, or `true` for a valid date.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-9e8762de1d4245df5a08c44d98f93304?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}