validate anything anywhere (javascript)