add script type and validate only on create and update