[Phplib-users] OOH forms: error validating
Brought to you by:
nhruby,
richardarcher
From: Emil M. <em...@pa...> - 2002-01-29 20:41:20
|
There probably is a better and easier way but here is what works= for me. in JavaScript function isBlank(val) { var rxAnyChar =3D /./i; return (!rxAnyChar.test((val.replace(/\s/g, "")))) ? true := false; } in PHP function is_blank($val) { return (!preg_match("/./i", trim($val))) ? true : false; } Cheers Emil |