✏️ 正在编辑: TamanhoString.php
路径:
/srv/systems_dir/yuppiecred/library/Validators/TamanhoString.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Validators_TamanhoString extends Zend_Validate_StringLength { public function isValid($value) { /* Retira as tags html do texto */ $value = mb_convert_encoding(strip_tags($value), "UTF-8"); if( !is_string($value) ){ $this->_error(self::INVALID); return false; } $this->_setValue($value); if( $this->_encoding !== null ){ $length = iconv_strlen($value, $this->_encoding); } else { $length = iconv_strlen($value); } if( $length < $this->_min ){ $this->_error(self::TOO_SHORT); } if( null !== $this->_max && $this->_max < $length ){ $this->_error(self::TOO_LONG); } if( count($this->_messages) ){ return false; } else { return true; } } }
💾 保存文件
← 返回文件管理器