[web] Fix min/max validity checking