Fix checkValid() function
Add Features: customize valid/invalid HTML. Fix checkValid()