A simple validation utility for javascript