fixing validation string for elasticApi and adding tests