Link to home
Create AccountLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

Can I use a static helper to verify a date with Razor?

I would like to use a static helper that verifies the date entered by the user is valid. The code is simple. I just try and parse the date and if it fails, there's an error with the date. But how do I call that static helper in Razor?

I would like the validation to happen when the user leaves the field.

Should I use JavaScript as the user leaves the field. If so, how do I call the static function written in C#?

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of curiouswebster

ASKER

Thanks!