Skip to content

Commit

Permalink
Add class check to isValid
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Guo committed Mar 28, 2014
1 parent 3544f44 commit 65c6521
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions BZGFormViewController/BZGFormViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,11 @@ - (void)formCell:(BZGFormCell *)formCell didChangeValidationState:(BZGValidation
{
BOOL isValid = YES;
for (BZGFormCell *cell in self.formCells) {
isValid = isValid &&
(cell.validationState == BZGValidationStateValid ||
cell.validationState == BZGValidationStateWarning);
if ([cell isKindOfClass:[BZGFormCell class]]) {
isValid = isValid &&
(cell.validationState == BZGValidationStateValid ||
cell.validationState == BZGValidationStateWarning);
}
}
self.isValid = isValid;
}
Expand Down

0 comments on commit 65c6521

Please sign in to comment.