refactored length validation into base external id service