G8MaterialKitTextField
                                
                                 G8MaterialKitTextField copied to clipboard
                                
                                    G8MaterialKitTextField copied to clipboard
                            
                            
                            
                        Better way to assign type
Hi @gali8. Thank you for great work :)
This is not a bug, but I just wanted to describe my experience with this code.
There should be a way to assign an Enum to regexPatternEnum instead of a number. Like:
myTextField.regexPatternEnum = .Email
Currently, it is
myTextField.regexPatternEnum = 9
which is not very descriptive.
Please add this feature in future version of this code.
Hi there, I know. Unfortunatelly using the @IBInspectable property, you can't write enums into the storyboard (so a Int is required). Anyway, I will update the class so you can choice (programmatically) the right regexPatternEnum, using... enums :) like you suggest.
Last, you can obtain the same result using the regexPattern property and the rawValue of enums:
myTextField.regexPatternEnum = 0 //that's the default, you can ignore it. myTextField.regexPatternCustom = RegexPatternTypes.Email.rawValue
Thank you @gali8. I'll wait for the update. (y)