Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MKTextField error state support #10

Open
ryanfitz opened this issue Jan 23, 2015 · 2 comments
Open

MKTextField error state support #10

ryanfitz opened this issue Jan 23, 2015 · 2 comments

Comments

@ryanfitz
Copy link

It would be great to be able to pass an error message to a text field to change the bottom border to a error state color and display the message below that.

textField.showErrorMessage("Username or Password is incorrect.")

To balance the api out, it would be nice to add a 'clearErrorMessage' function.

@gali8
Copy link

gali8 commented Feb 9, 2015

Look at https://github.com/gali8/G8MaterialKitTextField

@PhilippeBoisney
Copy link

Just a trick, but to handle error and show to user that textField is wrong I simply do that:

 txtFieldEmail.tintColor = UIColor.MKColor.Red
 txtFieldEmail.bottomBorderColor = UIColor.MKColor.Red
 txtFieldEmail.setNeedsLayout()

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

No branches or pull requests

3 participants