Fix validate() error when Element has Text