added presence and length validation for links