KN-4910 Bug fix: Validation throws error when custom attributes is used.