Updated validify() function

Adjusted it so that it is possible for us to update its attributes
externally (by adjusting the attribute and also its data value).

I don't think this is the ideal solution, so this will probably be
changed once I can figure out how to go about it.