added length validation for image alt and caption