Add validation check on entity length up to 256

fixed