Skip to content
jheytompkins edited this page Oct 2, 2013 · 1 revision

Formats the input to valid UK sort code '## - ## - ##':

  • Limits to 6 numbers
  • Restricts input to numbers or hyphens depending on the current state
  • Includes a - between each couplet.
$('input.uk_sort_code').formance('format_uk_sort_code');

Validates the uk sort code:

  • Validates the sort code can be parsed.
  • Validates the sort code is not empty nor short.
$('input.uk_sort_code').formance('validate_uk_sort_code');