Value too long text varchar (4000)

Well, I think it’s a good idea. But how can I do it just before the submission?