If you are using the code via spring boot/rest api,check whether @Valid annotation can be put on the description field and if it is applicable,there should be a length attribute too,the jackson library provides annotations on fieldwise validations like @Valid,@NonNull/@NotBlank