Fixed a bug in validation checking value.

I was accidentally checking for text inside an input instead of checking
the value of the input. Fixed now and is working like a charm.