feat: added trimming card name functionality

This commit is contained in:
2026-06-14 19:36:33 +03:00
parent 7d6cf9dd7b
commit fba54e0243
2 changed files with 8 additions and 2 deletions
@@ -50,10 +50,12 @@ fun sendToWatch(context: Context, path: String, message: String, onResult: (Bool
}
fun checkCardData(name: String, value: String): String? {
if (name.trim().isEmpty()) {
if (name.isEmpty()) {
return "Name should not be empty"
} else if (value.trim().isEmpty()) {
} else if (value.isEmpty()) {
return "Code value should not be empty"
} else if (name.length > 32) {
return "Name must be shorter than 32 symbols"
}
return null