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, |     initialValue: String, | ||||||
|     @StringRes label: Int, |     @StringRes label: Int, | ||||||
|     singleLine: Boolean = false, |     singleLine: Boolean = false, | ||||||
|     isValid: MutableState<Boolean>, |     isValid: MutableState<Boolean> = remember { mutableStateOf(true) }, | ||||||
|     isFirst: MutableState<Boolean> = remember { mutableStateOf(false) }, |     isFirst: MutableState<Boolean> = remember { mutableStateOf(false) }, | ||||||
|     @StringRes errorText: Int, |     @StringRes errorText: Int, | ||||||
|     keyboardType: KeyboardType, |     keyboardType: KeyboardType, | ||||||
|  |  | ||||||
|  | @ -30,6 +30,7 @@ class BreakTimerFormScreen( | ||||||
|             initialValue = breakTimerInfo.repeats.toString(), |             initialValue = breakTimerInfo.repeats.toString(), | ||||||
|             label = R.string.repeats, |             label = R.string.repeats, | ||||||
|             errorText = AppText.repeats_error, |             errorText = AppText.repeats_error, | ||||||
|  |             isValid = mutableStateOf(false), | ||||||
|             keyboardType = KeyboardType.Decimal, |             keyboardType = KeyboardType.Decimal, | ||||||
|             predicate = { it.matches(Regex("[1-9]+\\d*")) } |             predicate = { it.matches(Regex("[1-9]+\\d*")) } | ||||||
|         ) { correctlyTypedInt -> |         ) { correctlyTypedInt -> | ||||||
|  |  | ||||||
		Reference in a new issue
	
	 Lukas Barragan Torres
						Lukas Barragan Torres