Esempio n. 1
0
 /**
  * Add live validation rules
  *
  * @param array  *$rules An array of Laravel rules
  * @return void 
  * @static 
  */
 public static function withRules()
 {
     \Former\Former::withRules();
 }
Esempio n. 2
0
 public function testDisablingValidation()
 {
     Former::config('live_validation', false);
     Former::withRules(array('foo' => 'required'));
     $input = Former::text('foo')->__toString();
     $matcher = $this->cg($this->field(), '<label for="foo" class="control-label">Foo</label>');
     $this->assertEquals($matcher, $input);
 }