Fixed the context for custom validation