add helpers for max length and regexp
bugfix : avoid errors when value is null