Implementing format:custom

- Adding an example of RepeatingFields showing format:custom
Renaming incorrectly named function.
Fixing bug where directive was undefined instead of the empty string.
Adding code to fall back to default value for options with an invalid value.