Liking cljdoc? Tell your friends :D

brazilian-utils.boleto.validation

Validation logic for Brazilian boleto (payment slip) digitable lines.

Supports two types of boletos:

  • Bancário (bank boleto): 47 digits, for general payments
  • Arrecadação (collection boleto): 48 digits, for taxes and utility bills
Validation logic for Brazilian boleto (payment slip) digitable lines.

Supports two types of boletos:
- Bancário (bank boleto): 47 digits, for general payments
- Arrecadação (collection boleto): 48 digits, for taxes and utility bills
raw docstring

boleto-arrecadacao?clj/s

(boleto-arrecadacao? digits)

Checks if boleto is of ARRECADAÇÃO type (collection boleto).

Collection boletos have 48 digits and start with 8. Used for taxes, utility bills, and government payments. Note: This only checks the type, not validity.

Args: digits - String of digits

Returns: true if arrecadação type, false otherwise

Checks if boleto is of ARRECADAÇÃO type (collection boleto).

Collection boletos have 48 digits and start with 8.
Used for taxes, utility bills, and government payments.
Note: This only checks the type, not validity.

Args:
  digits - String of digits

Returns:
  true if arrecadação type, false otherwise
sourceraw docstring

boleto-bancario?clj/s

(boleto-bancario? digits)

Checks if boleto is of BANCÁRIO type (bank boleto).

Bank boletos have 47 digits and do not start with 8. Note: This only checks the type, not validity.

Args: digits - String of digits (should be at least 47 digits)

Returns: true if bancário type, false otherwise

Checks if boleto is of BANCÁRIO type (bank boleto).

Bank boletos have 47 digits and do not start with 8.
Note: This only checks the type, not validity.

Args:
  digits - String of digits (should be at least 47 digits)

Returns:
  true if bancário type, false otherwise
sourceraw docstring

is-valid?clj/s

(is-valid? digitable-line)

Validates a complete boleto digitable line.

Accepts both formatted and unformatted inputs with 46, 47, or 48 digits. Automatically detects type (bancário or arrecadação) and applies appropriate validation rules.

Args: digitable-line - String containing boleto digits (may include formatting)

Returns: true if valid, false otherwise

Examples: (is-valid? "23790.00000 00000.000000 00000.000000 0 00000000000000") ;; => true/false (is-valid? "848600000000123456789012345678901234567890123456") ;; => true/false

Validates a complete boleto digitable line.

Accepts both formatted and unformatted inputs with 46, 47, or 48 digits.
Automatically detects type (bancário or arrecadação) and applies
appropriate validation rules.

Args:
  digitable-line - String containing boleto digits (may include formatting)

Returns:
  true if valid, false otherwise

Examples:
  (is-valid? "23790.00000 00000.000000 00000.000000 0 00000000000000") ;; => true/false
  (is-valid? "848600000000123456789012345678901234567890123456") ;; => true/false
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close