When creating Umbraco document types you can validate content entry by using regular expressions in the Validation field.
Input must be between 5 and 10 characters:
^.{5,10}$