Closed (fixed)
Project:
DvG Webform Components
Version:
7.x-1.0-beta8
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Jun 2017 at 11:58 UTC
Updated:
24 Oct 2017 at 15:25 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
joshahubbers commentedempty validates 0 as valid. Isset will do.
Comment #3
paulvandenburg commentedAdded a minor improvement to the validation, but functionally it was good.
Comment #4
askibinski commentedThe empty function was used to handle usecases when the BSN field is not required. However, in this case it would indeed result in '0' returning a valid BSN number because 0 returns true in empty(). The !isset() does not fix this because it never triggers (it is always set even if empty).
The check needs to be different in case the field is left empty.
Comment #5
askibinski commentedComment #6
paulvandenburg commentedTested a non required empty bsn field which works again with the patch.
0 and 00000000 are still caught as invalid.
Comment #8
ralphvdhoudt commentedComment #9
ralphvdhoudt commented