title: Angular2 - Validators.compose
body: <p>I am having problems with the <code>Validators.compose</code> function (no errors, just doesn't validate)</p>
  
  <p>Here is my code:</p>
  
  <pre><code>  var validators = ()=&gt; {
             var validatorArr = [];                
             validatorArr.push(Validators.required);
             validatorArr.push(Validators.maxLength(column.max));
             return Validators.compose(validatorArr);
      };
    var ctrl: Control = new Control(row.items[column.mapper], validators);
    row.form.addControl(column.mapper, ctrl);
  </code></pre>
  
  <p>when I put <code>Validators.required</code> instead of the <code>validators</code> function, the validation works.</p>