It seems that calling re-matches when the value pulled from params is nil throws an error in invalid-params fn.
This pr adds an additional check to see if the param value is non-nil before trying to validate it via regex. If it is nil, then it is essentially invalid as it doesn't match the route.
I was getting errors while using
defroute
with validations.My vector route looked like:
The error printed to the JS console was:
It seems that calling re-matches when the value pulled from params is nil throws an error in
invalid-params
fn.This pr adds an additional check to see if the param value is non-nil before trying to validate it via regex. If it is nil, then it is essentially invalid as it doesn't match the route.
Thanks for the great library!