Révision 76e2e7c3
Ajouté par Assos Assos il y a environ 10 ans
drupal7/sites/all/modules/rules/ui/ui.forms.inc | ||
---|---|---|
684 | 684 |
} |
685 | 685 |
} |
686 | 686 |
|
687 |
/** |
|
688 |
* FAPI callback to validate an IP address. |
|
689 |
*/ |
|
690 |
function rules_ui_element_ip_address_validate($element, &$form_state) { |
|
691 |
$value = $element['#value']; |
|
692 |
if ($value != '' && !filter_var($value, FILTER_VALIDATE_IP)) { |
|
693 |
form_error($element, t('%name is not a valid IP address.', array('%name' => $element['#title']))); |
|
694 |
} |
|
695 |
} |
|
696 |
|
|
687 | 697 |
/** |
688 | 698 |
* FAPI validation of a date element. Makes sure the specified date format is |
689 | 699 |
* correct and converts date values specifiy a fixed (= non relative) date to |
Formats disponibles : Unified diff
Weekly update of contrib modules