This is a form data validation class implemented through a piece of PHP code. It is a very easy-to-use and convenient form data validation class
<?php //验证类 class Fun{ function isEmpty($val) { if (!is_string($val)) return false; //是否是字符串类型 if (empty($val)) return false; //是否已设定 if ($val=='') return false; //是否为空 return true; }
All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn
Related Article
![Which PHP Library Best Fits Your Email Address Validation Needs?](https://img.php.cn/upload/article/001/246/273/173188824365387.jpg)
18Nov2024
PHP Email Address Validation Libraries UncoveredEmail address validation plays a crucial role in data validation, but creating a...
![What is the Most User-Friendly Form Validation Library for PHP with Comprehensive Features and Robust Error Handling?](https://img.php.cn/upload/article/001/246/273/172914741063665.jpg)
17Oct2024
Easiest Form Validation Library for PHPPHP boasts a plethora of validation libraries, each with its own strengths and weaknesses. To identify the ideal choice for your project, it's essential to consider factors such as simplicity, flexibility, and e
![Memcache vs. Memcached: Which PHP Library Should You Choose?](https://img.php.cn/upload/article/001/246/273/173112768360823.jpg)
09Nov2024
Distinguishing "Memcache" and "Memcached" in PHPPHP offers two memcached libraries: memcache and memcached. Understanding their differences helps...
![How Do I Link Static Libraries That Depend on Other Static Libraries?](https://img.php.cn/upload/article/001/246/273/173408941480807.jpg)
13Dec2024
Linking Static Libraries to Other Static Libraries: A Comprehensive ApproachStatic libraries provide a convenient mechanism to package reusable...
![Memcache vs Memcached: Which PHP Memcached Library Should You Choose?](https://img.php.cn/upload/article/001/246/273/173202768439255.jpg)
19Nov2024
Memcache vs Memcached: Choosing the Right PHP Memcached LibraryIntroductionPHP offers two seemingly similar memcached libraries: memcache and...
![Is There an Email Address Validation Library for PHP?](https://img.php.cn/upload/article/001/246/273/173173044461511.jpg)
16Nov2024
Does PHP Offer an Email Address Validation Library?Validating email addresses is a tedious task that requires adherence to intricate standards. To...
![](/static/imghwm/down_right.png)
![](/static/imghwm/taglogo.png)
Hot Tools
![PHP library for dependency injection containers](https://img.php.cn/upload/manual/000/000/001/5e21721e79a2b232.png)
PHP library for dependency injection containers
PHP library for dependency injection containers
A collection of 50 excellent classic PHP algorithms
Classic PHP algorithm, learn excellent ideas and expand your thinking
Small PHP library for optimizing images
Small PHP library for optimizing images
![](/static/imghwm/taglogo.png)