Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

FormDescriptor#validateForm not public #49

Closed
angeloashmore opened this issue May 23, 2015 · 3 comments
Closed

FormDescriptor#validateForm not public #49

angeloashmore opened this issue May 23, 2015 · 3 comments

Comments

@angeloashmore
Copy link

FormDescriptor#validateForm is not public.

There does not seem to be a built-in way to validate fields based on FormRowDescriptor.Configuration.Required.

Is this intentional?

// SwiftForms/descriptors/FormDescriptor.swift

func validateForm() -> FormRowDescriptor! {
    for section in sections {
        for row in section.rows {
            if let required = row.configuration[FormRowDescriptor.Configuration.Required] as? Bool {
                if required && row.value == nil {
                    return row
                }
            }
        }
    }
    return nil
}
@angeloashmore angeloashmore changed the title FormDescriptor#validateForm() not public FormDescriptor#validateForm not public May 23, 2015
@ortuman
Copy link
Owner

ortuman commented May 23, 2015

Right! I'm gonna fix it and commit right now. Thanks!

@ortuman
Copy link
Owner

ortuman commented May 23, 2015

Done!

@ortuman ortuman closed this as completed May 23, 2015
@angeloashmore
Copy link
Author

Wow, looks like you went on an issue squashing rampage! Awesome!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants