mhv

MHValidation

Validates objects in a view. You just have to set the classes which you want to validate.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

48

Maintenance

Last Commit

8yrs ago

Contributors

3

Package

Dependencies

0

License

MIT

Categories

Readme

ios-MHValidation

alt tag

Setup

Install MVValidation

[self.scrollView installMHValidationWithClasses:@[[UITextField class],
                                                  [UISwitch class],
                                                  [UISegmentedControl class],
                                                  [UITextView class]
                                                    ]
                       setCustomizationBlock:^(MHTextObjectsCustomization *customization) {

                       }];

Set AccessibilityIdentifiers

self.firstName.accessibilityIdentifier = @"Vorname";

self.secondName.accessibilityIdentifier = @"Nachname"; self.email.accessibilityIdentifier = @"E-Mail"; self.PLZ.accessibilityIdentifier = @"Postleitzahl"; self.sex.accessibilityIdentifier = @"Geschlecht"; self.allow.accessibilityIdentifier = @"Erlauben"; self.problems.accessibilityIdentifier = @"Probleme"; self.phoneNumber.accessibilityIdentifier = @"Telefonnummer";

Validate

    //Regex Validation

MHValidationItem *emailValidation = [[MHValidationItem alloc]initWithObject:self.email regexString:MHValidationRegexEmail];

[self.scrollView validateWithNONMandatoryTextObjects:@[self.secondName] validateObjectsWithMHRegexObjects:@[emailValidation] switchesWhichMustBeON:nil curruptObjectBlock:^(NSArray *curruptItem) {

                                  } successBlock:^(NSString *emailString, NSDictionary *valueKeyDict, NSArray *object, bool isFirstRegistration) {
                                      
                                                                              
                                  }];

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100