diff --git a/src/Application/Features/Candidates/Queries/Search/CandidateSearchQueryValidator.cs b/src/Application/Features/Candidates/Queries/Search/CandidateSearchQueryValidator.cs index b37e9d96..618acd33 100644 --- a/src/Application/Features/Candidates/Queries/Search/CandidateSearchQueryValidator.cs +++ b/src/Application/Features/Candidates/Queries/Search/CandidateSearchQueryValidator.cs @@ -28,10 +28,11 @@ public CandidateSearchQueryValidator() RuleFor(q => q.ExternalIdentifier) .NotEmpty() - .NotNull() .WithMessage("External identifier is required") .Matches(ValidationConstants.AlphaNumeric) - .WithMessage(string.Format(ValidationConstants.AlphaNumericMessage, "External Identifier")); + .WithMessage(string.Format(ValidationConstants.AlphaNumericMessage, "External Identifier")) + .Length(7) // CRN and NOMIS Number (both 7 chars) + .WithMessage("Unrecognised format for External Identifier"); } } \ No newline at end of file