Refactored the whole plugin to use attributes
It is a lot less code and makes the validation way more reusable