Reuse your Rails model validations on the client-side.