Skip to main content

is_valid

Function is_valid 

Source
pub fn is_valid(input: &str) -> bool
Expand description

Convenience function that returns true if the RUC is valid, false otherwise.

§Arguments

  • input - A string containing the RUC number.

§Examples

use ec_validator::ruc;

assert!(ruc::is_valid("1713175071001"));
assert!(!ruc::is_valid("0000000000000"));