Changeset 683 for trunk/Common/Form/Types
- Timestamp:
- Aug 5, 2014, 11:02:46 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Form/Types/MacAddress.php
r606 r683 29 29 return('"'.addslashes($Value).'"'); 30 30 } 31 31 32 32 function Validate($Item) 33 33 { 34 34 if($Item['Null'] and ($Item['Value'] == '')) return(true); 35 return(preg_match('/^([0-9A-F]{2}[: -]){5}([0-9A-F]{2})$/', $Item['Value']));35 return(preg_match('/^([0-9A-F]{2}[:]){5}([0-9A-F]{2})$/', $Item['Value'])); 36 36 } 37 37
Note:
See TracChangeset
for help on using the changeset viewer.