title: Rx Swift : Complex TextFields Validation
body: <p>I'm new to <code>RxSwift</code> and all example I found are handling simple cases.</p>
  
  <p>I'm trying to do form validation for my textfields.
  My custom TextField class has a method <code>isValid()</code> and a <code>regexp</code>. The <code>isValid</code> return is based on the <code>regexp</code> attribute.</p>
  
  <p>So far, I have written the following :</p>
  
  <pre><code>let valids = [mLastName, mFirstName, mEmailField].map {
      $0.rx.text.map {
          text -&gt; Bool in
          // I want more complex logic here
          // Like return field.isValid()
          return text!.characters.count &gt; 0
      }
  }    
  
  let _ = Observable.combineLatest(valids) { iterator -&gt; Bool in
      return iterator.reduce(true, { $0 &amp;&amp; $1 })
  }.subscribe(onNext: { allValid in
      ///update button according to AllValid
  })
  </code></pre>
  
  <p>Does anyone know how to update the code to base the first <code>Observable&lt;Bool&gt;</code> be based on my <code>isValid()</code> method instead of <code>text!.characters.count</code></p>