I just did a quick pass through the .module file and cleaned the code a bit.
- reformat code according to drupal code style
- changed and added some comments
- array_unshift instead of array_merge in the hook_element_info_alter
- fixed a little bug: not required elements with value 0 shouldn't be treated as 'empty'
- changed form_set_error to form_error
todo:
- add comments to rule/filter callbacks instead of a single one above the whole block
- perhaps use filter_var instead of custom checks/regexes/etc
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2604526-2.patch | 7.6 KB | spadxiii |
Comments
Comment #2
spadxiii commentedComment #3
pedrofaria commentedYour patch was ported to Drupal 8 version. Thanks!
Comment #5
astonvictor commentedSince, it's committed then we can close it.
Comment #6
astonvictor commented