title: Using RxSwift, How To Enable UIButton Based on Valid Text?
body: <p>In RxSwift/RxCocoa 2.0.0- beta 3, I have a ViewModel with:</p>
  
  <pre><code>let someString = Variable("")
  
  func isValidSomeString() -&gt; Observable&lt;Bool&gt;  {
  
      if someString.value.characters.count == 0 {
          return just(false)
      }
      return just(true)
  }   
  </code></pre>
  
  <p>I have the someString bound already to a text field in the ViewController. </p>
  
  <p>Whenever the someString (or perhaps the text field if that's a better way) changes, I want a button enabled based on if someString is valid. </p>
  
  <p>I tried using the "Observable&lt; Bool >", but started going down another path. I could do this in the ViewController:</p>
  
  <pre><code>    someViewModel.someString.subscribeNext { text -&gt; Void in
  
          // could just someUIButton.enabled = someViewModel.isValidSomeString(text)
  
      }.addDisposableTo(disposeBag)
  </code></pre>
  
  <p>Isn't there another way that is less verbose than the isValidSomeString(text) approach? We already have had nice success with a isValidLogin that returns Observable&lt; Bool > which used combineLatest. </p>