Your code looks pretty good to me, though you could make it signficantly neater by creating a class to do the validation. If you don't have much experience with classes, this is would be an excellent time to look into it... Classes aren't for everything, or even everyone, but validation classes make a lot of sense.
Ideally you'd use both forms of validation, but if you're only going to use one then it really has to be server side.
Too be honest though, I don't really think this is related to cleaner code. You can have clean code using either method, it's just about implementation.