passing validation to element