validate tag length on frontend