Refactors the permalink validation 

Modified some methods to look prettier and moves the error message to the locale files