What are my options for using the same JavaScript code to validate both on client side and on server side (Node.js)?
Take a look at revalidator. It is described as "A cross-browser / node.js validator used by resourceful and flatiron."