MVTextFieldMoneyFormatType - Which is used to accept money format entry(like 2.5,234.50).
MVTextFeildNumberType - Which is accept only number value.
MVTextFieldStringType - Which is accept only string value.
MVTextFieldStringWithNumberType - Which is accept string with number. It won't accept special character.
MVTextFieldDefautType - Which is accept all values like default text field.
MVMailValidationType - Validate Entered text is email or not
MVEmptyValidationType - Validate textfield is empty or empty spaces.
MVValidationTypeNone - No validation.
This is custom keyboard for your specific field
MVNumberKeyBoardType - It shows custom keyboard which is created by me.
1. Use marginValue property to adjust the text from left side.
1. Use allowedTextLength to restrict the number of character entry into the textfield.
2. Use allowedDecimalLength to restrict the character entry after dot entered.
TextFieldDidBeginEditBlock - Which is called while textfield edit begun.
TextFieldDidEndEditBlock - Which is called while textfield end editing.
TextDidChangeBlock - Which is called while textfield charcater change.
1. Who's need money format entry in text field (like 124.98)?
2. Who's need to restrict the number of character entry?
3. Whom wants to integrate custom keyboard into the text field?
4. Who's need email validation on textfield?
1. Integrate showing visual validation on textfield leftview for email,number and etc...
2. Custom keyboard customization like changing background color and title color and etc..
3. Add new type of keyboard.
4. Add icon on left and right view with simple method.
MVTextField *_defaultTextField=[[MVTextField alloc]init];
//Set textfield type
_defaultTextField.fieldType=MVTextFeildNumberType;
//Set maximum length of text
_defaultTextField.allowedTextLength=4;
//Set maximum length after entering dot
_defaultTextField.allowedDecimalLength=3;
//Set margin value for text as well as placeholder
_defaultTextField.marginValue=2;
//Set validation type
_defaultTextField.textFieldValidationType=MVMailValidationType;
//Set return string value if validation got failed
_defaultTextField.validationString=@"Mail id is incorrect";
//Set custom key board type if fieldtype is not a numberpad means it won't work
_defaultTextField.textFieldKeyBoardType=MVNumberKeyBoardType;
//Set Block method for textfield didbegin editing delegate
[_defaultTextField showWithBeginEditingValue:^(UITextField *textField) {
NSLog(@"did begin editing");
}];
//Set Block method for textfield endediting delegate
[_defaultTextField showWithEndEditingValue:^(UITextField *textField) {
NSLog(@"edit end %@",textField.text);
//check validation when textfield end editing value called by calling below method
// If nil means validation success
// If return the validationstring means validation got failed.
NSLog(@"valid==%@",[_defaultTextField validateTheTextField]);
}];
//Set Block method for textfield textdidchange delegate
[_defaultTextField showTextDidchange:^(UITextField *textField) {
NSLog(@"text change %@",textField.text);
}];