dynamic validation working