isValid method

bool isValid()

Implementation

bool isValid() {
  bool isValid = true;
  for (var section in sections) {
    for (var field in section.fields) {
      if (field is GSField) {
        bool fieldValidation = (field.child as GSFieldCallBack).isValid();
        field.model?.status = fieldValidation ? GSFieldStatusEnum.success : GSFieldStatusEnum.error;
        isValid = isValid && fieldValidation;
        field.update();
      }
    }
  }
  return isValid;
}