Fixed required validator bug

IMO, need some fine-tuning, but it seems to work. Please test!!!

**EDIT**

I noticed that if you change the data attribute on-the-fly, it doesn't work. This is just beyond my reach/I have other things to do, so please check this out thoroughly. =/