Added some server-side validations