Changed some validation rules. Added doc size to ES.