Update validator.js

Just some minor fixes. 

Edited:
- unmark: no remaining div in vertical mode appears (white pixels!)
- prepareFieldData: if data.type is not defined, is interpreted as 'text'