File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
main/kotlin/br/com/colman/simplecpfvalidator
test/kotlin/br/com/colman/simplecpfvalidator Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ import kotlin.math.abs
3939fun String.isCpf (charactersToIgnore : List <Char > = listOf('.', '-')): Boolean {
4040 val cleanCpf = this .filterNot { it in charactersToIgnore }
4141 if (cleanCpf.containsInvalidCPFChars() || cleanCpf.isInvalidCpfSize() || cleanCpf.isBlacklistedCpf()) return false
42- return this .hasValidVerificationDigits()
42+ return cleanCpf .hasValidVerificationDigits()
4343}
4444
4545/* *
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ class CpfValidatorTest : FunSpec({
4343 }
4444
4545 test("Should sanitize the String given replaceable characters and still return true on valid cpfs") {
46- ValidCpfGenerator .map { " $it ..--." }.forAll { cpf -> cpf.isCpf(listOf('.', '-')) }
46+ ValidCpfGenerator .map { " ..--. $it ..--." }.forAll { cpf -> cpf.isCpf(listOf('.', '-')) }
4747 }
4848
4949 test("Shouldn 't sanitize unspecified characters") {
You can’t perform that action at this time.
0 commit comments