add length validation to the models