# Filtering and modifying text input in Jetpack Compose way

DevFeed: [Filtering and modifying text input in Jetpack Compose way](<https://devfeed.tech/articles/filtering-and-modifying-text-input-in-jetpack-compose-way-25720.md>)

Original publisher: [Read original article](<https://blog.shreyaspatil.dev/filtering-and-modifying-text-input-in-jetpack-compose-way/>)

Author: Shreyas Patil

Published: 2021-12-20T12:15:05Z

Content type: tutorial

Language: en

Sources: [Shreyas Patil's Blog](<https://devfeed.tech/sources/shreyas-patil-s-blog.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [User experience (UX)](<https://devfeed.tech/topics/ux.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [compose](<https://devfeed.tech/tags/compose.md>), [filter](<https://devfeed.tech/tags/filter.md>), [formatting](<https://devfeed.tech/tags/formatting.md>), [guide](<https://devfeed.tech/tags/guide.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [ui](<https://devfeed.tech/tags/ui.md>), [ux](<https://devfeed.tech/tags/ux.md>)

## AI overview

A tutorial on formatting numeric input and preserving ordinary messages in a Jetpack Compose TextField. It explains why filtering text directly in the input callback can cause keyboard mode and cursor-position problems, and presents a visual transformation approach that changes the displayed text without modifying the edit buffer.

## Source excerpt

Learn how to filter and modify user text input in Jetpack Compose. A guide to implementing input constraints and formatting for TextField.