Hey everyone :wave: I just released <https://gith...
# feed
o
Hey everyone 👋 I just released ìkọkúkọ a reactive, type-safe form validation library for Compose Multiplatform (Android & iOS). It’s built entirely with Kotlin and designed to make form validation declarative, reactive, and easy to reason about across both platforms. https://github.com/quantipixels/ikokuko ✨ What it does • ✅ Reactive validation using Compose state • ✅ Type-safe fields and validators (e.g.,
Field.Text
,
Field.Boolean
) • ✅ Works seamlessly with Compose Multiplatform UI • ✅ Built for Android + iOS (and ready for desktop/web later) • Supports common validators like: •
RequiredValidator
•
EmailValidator
•
MinLengthValidator
• Custom validators Quick example
Copy code
val PasswordField = Field.Text("password")

Form(onSubmit = { println(PasswordField.value) }) {
    FormField(
        field = PasswordField,
        default = "",
        validators = listOf(
            RequiredValidator("Password required"),
            MinLengthValidator("At least 8 characters", 8))
        ) {
            OutlinedTextField(
                value = PasswordField.value,
                isError = !PasswordField.isValid,
                label = { Text("Password") },
                supportingText = PasswordField.error?.let { { Text(it, color = MaterialTheme.colorScheme.error) } },
                onValueChange = { PasswordField.value = it }
            )
    }
    Button(onClick = ::submit) { Text("Sign Up") }
}
Looking for feedback Since this is the first public release, I’d love to hear your thoughts: • Does the API feel Kotlin-y enough? • Anything confusing or repetitive about validation setup? • Any missing validators or form patterns you’d expect? • Would you use it in your Compose Multiplatform projects? If you’ve tried it, even brief feedback or suggestions (naming, ergonomics, new ideas) would be hugely appreciated ❤️ Here's a demo video of the sample app in action.
❤️ 1
k
Should this have a
Field.Password
variant to match the expected interactive visuals of typing a password?
o
Field
class is just for input types (String, Long, Boolean, etc), not visuals related. Redacting a password input is up to the developer via the normal
PasswordVisualTransformation
on a compose
TextField
.
Copy code
OutlinedTextField(
                value = PasswordField.value,
                isError = !PasswordField.isValid,
                label = { Text("Password") },
                supportingText = PasswordField.error?.let { { Text(it, color = MaterialTheme.colorScheme.error) } },
                onValueChange = { PasswordField.value = it },
                visualTransformation = PasswordVisualTransformation()
            )
k
I'd suggest incorporating this into your demo video for the password field
👍 1