added the connection as an argument in the method validation. If the
return of the validation is not a string object itself is returned.