Skip to content

Conversation

@antonikochet
Copy link
Collaborator

  • adding required field designation and example

}
}

open var requiredText: String? = " *" {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should manage that space internally. Its not really obvious for user that he/she should take care of it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to private property

}
}

open var isRequired: Bool = false {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to somehow mention this functionality in README

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants