validations for lamp and lamp editing