isValid is optional and by default true
This commit is contained in:
parent
b4166386a5
commit
a328d2194f
2 changed files with 2 additions and 1 deletions
|
@ -117,7 +117,7 @@ fun LabeledErrorTextField(
|
|||
initialValue: String,
|
||||
@StringRes label: Int,
|
||||
singleLine: Boolean = false,
|
||||
isValid: MutableState<Boolean>,
|
||||
isValid: MutableState<Boolean> = remember { mutableStateOf(true) },
|
||||
isFirst: MutableState<Boolean> = remember { mutableStateOf(false) },
|
||||
@StringRes errorText: Int,
|
||||
keyboardType: KeyboardType,
|
||||
|
|
|
@ -30,6 +30,7 @@ class BreakTimerFormScreen(
|
|||
initialValue = breakTimerInfo.repeats.toString(),
|
||||
label = R.string.repeats,
|
||||
errorText = AppText.repeats_error,
|
||||
isValid = mutableStateOf(false),
|
||||
keyboardType = KeyboardType.Decimal,
|
||||
predicate = { it.matches(Regex("[1-9]+\\d*")) }
|
||||
) { correctlyTypedInt ->
|
||||
|
|
Reference in a new issue