add checks for maxlenght to embeddedclient