Added length validation for hours field