adds validation during pattern loading