Added the length validation to the model