Clean up validation code for COOK-4337

Specifically, split validate_nameable into two methods since the two use cases didn't share any code. Additionally, remove duplicates of validate_numeric() code present in validate_nameable.