public function set($rules, $formName = null)
    {
        if (isset($rules)) {
            // set form name in order to get related validation rules
            $this->currentFormName = $formName;

            $this->validationRules[$formName] = (array)$rules;
        }
    }
public function set($rules, $formName = null)
    {
        if (isset($rules)) {
            // set form name in order to get related validation rules
            $this->currentFormName = $formName;

            $this->validationRules[$formName] = (array)$rules;
        }
    }
public function set ( $ rules , $ formName = null ) { if ( isset ( $ rules ) ) { // set form name in order to get related validation rules $ this -> currentFormName = $ formName ; $ this -> validationRules [ $ formName ] = ( array ) $ rules ; } }
Set rules for validation.

@param array $rules Laravel validation rules
@param string $formName
Set rules for validation .