public function getValue()
    {
        if (null == $this->is_valid && null != $this->user_value) {
            $this->validate();
        }
        if (null !== $this->user_value && $this->is_valid) {
            if ('' === $this->user_value && true === $this->null_on_empty) {
                return null;
            }
            return $this->user_value;
        } else {
            if ('' === $this->default_value && true === $this->null_on_empty) {
                return null;
            }
            return $this->default_value;
        }
    }
public function getValue()
    {
        if (null == $this->is_valid && null != $this->user_value) {
            $this->validate();
        }
        if (null !== $this->user_value && $this->is_valid) {
            if ('' === $this->user_value && true === $this->null_on_empty) {
                return null;
            }
            return $this->user_value;
        } else {
            if ('' === $this->default_value && true === $this->null_on_empty) {
                return null;
            }
            return $this->default_value;
        }
    }
public function getValue ( ) { if ( null == $ this -> is_valid && null != $ this -> user_value ) { $ this -> validate ( ) ; } if ( null !== $ this -> user_value && $ this -> is_valid ) { if ( '' === $ this -> user_value && true === $ this -> null_on_empty ) { return null ; } return $ this -> user_value ; } else { if ( '' === $ this -> default_value && true === $ this -> null_on_empty ) { return null ; } return $ this -> default_value ; } }
Gets the value of the field, either the user set value if valid and set, or the object value.

@return mixed
Gets the value of the field either the user set value if valid and set or the object value .