Adding required field designation#12
Adding required field designation#12antonikochet wants to merge 3 commits intopaddings_for_formatting_tffrom
Conversation
antonikochet
commented
Mar 7, 2024
- adding required field designation and example
| } | ||
| } | ||
|
|
||
| open var requiredText: String? = " *" { |
There was a problem hiding this comment.
I think we should manage that space internally. Its not really obvious for user that he/she should take care of it
There was a problem hiding this comment.
moved to private property
| } | ||
| } | ||
|
|
||
| open var isRequired: Bool = false { |
There was a problem hiding this comment.
I think we need to somehow mention this functionality in README
There was a problem hiding this comment.
I believe we should also think how to reduce amount of properties that serves this 'is required' feature. It's 3 of them now and it feels like a lot.
Maybe we can hardcode * as 'required field' symbol or use error color for coloring. or just use an attributed string. Let's think what would fit better
There was a problem hiding this comment.
added to readme. And removed the color for the required field, now errorTintColor will be used
| guard placeholder != nil else { return } | ||
| placeholderLabel.text = placeholder | ||
| guard let placeholder else { return } | ||
| if isRequired, let requiredText { |
There was a problem hiding this comment.
perhaps we need another idea here, because for some reason this solution has visual glitches during animation. You can compare it by switching to main branch
…been added to the readme