added validation

this was originally removed during debugging but it turned out the problem I was having was due to a mis-called array key and nothing to do with the validation function, so adding it back in. Not that this plugin needs a lot of validation, but this would potentially prevent people from adding in a value using google chrome's inspector or something.