Update valid.js

Added a confirm field, and fixed a few bugs.

-Quirk. While you can validate multiple forms with this, it may cause an error if there are two forms with a "confirm" field.