3 ms·
Following the comments posted here, I think the proper way to format input is to split the transformations into two. The credit card example gives us purely co
by ulucs 8y ago
Following the comments posted here, I think the proper way to format input is to split the transformations into two.
The credit card example gives us purely cosmetic changes and it makes sense to apply them in real-time so the user receives important feedback. The other type is the application of strict formatting, like in the date format example. It's really nice to infer 1992223 as 1992/02/23, but it robs some control from the user. As we're already inferring what the user is trying to say, we could show them 1992/2/23 to give them feedback and apply the transformation before sending the data, thus having the best of both worlds.