Task #4731 & #4732 Add validates for device form and profile form