javascript design validator