Changeset 605 for trunk/Common/Form/Types
- Timestamp:
- Dec 8, 2013, 4:38:25 PM (11 years ago)
- Location:
- trunk/Common/Form/Types
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Form/Types/Base.php
r601 r605 60 60 return($Output); 61 61 } 62 63 function Validate($Item) 64 { 65 return(true); 66 } 62 67 } -
trunk/Common/Form/Types/IPv4Address.php
r548 r605 21 21 return($_POST[$Item['Name']]); 22 22 } 23 24 function Validate($Item) 25 { 26 if($Item['Null'] and ($Item['Value'] == '')) return(true); 27 return(filter_var($Item['Value'], FILTER_VALIDATE_IP, array('flags' => FILTER_FLAG_IPV4))); 28 } 23 29 } -
trunk/Common/Form/Types/Type.php
r574 r605 19 19 include(dirname(__FILE__).'/GPS.php'); 20 20 include(dirname(__FILE__).'/IPv4Address.php'); 21 include(dirname(__FILE__).'/IPv6Address.php'); 21 22 include(dirname(__FILE__).'/Color.php'); 22 23 include(dirname(__FILE__).'/RandomHash.php'); 24 include(dirname(__FILE__).'/MacAddress.php'); 23 25 24 26 class Type … … 52 54 'Color' => array('Name' => 'Color', 'Class' => 'Color', 'ParentType' => '', 'Parameters' => array()), 53 55 'RandomHash' => array('Name' => 'RandomHash', 'Class' => 'RandomHash', 'ParentType' => '', 'Parameters' => array()), 56 'MacAddress' => array('Name' => 'MacAddress', 'Class' => 'MacAddress', 'ParentType' => '', 'Parameters' => array()), 57 'IPv6Address' => array('Name' => 'IPv6Address', 'Class' => 'IPv6Address', 'ParentType' => '', 'Parameters' => array()), 54 58 ); 55 59 }
Note:
See TracChangeset
for help on using the changeset viewer.