Not sure I agree with the idea that you should validate only on the backend, I think you should do both. Backend validation is for you, to ensure that the data is valid and sane, frontend validation is for the user, so they can get early feedback if something is wrong.