You're assuming that all requests are coming from your webpage. Have you tried using Test::WWW::Mechanize to hit your server directly with requests that contain bad values?
My criteria for good software:
Does it work?
Can someone else come in, make a change, and be reasonably certain no bugs were introduced?