added validator for gallery