/** * Add live validation rules * * @param array *$rules An array of Laravel rules * @return void * @static */ public static function withRules() { \Former\Former::withRules(); }
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); }