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

Validation Not Working when Submit button is clicked #164

@moderateepheezy

Description

@moderateepheezy
fileprivate func loadForm() {
        let form = FormDescriptor(title: "Address")
        
        let section1 = FormSectionDescriptor(headerTitle: nil, footerTitle: nil)
        
        var row = FormRowDescriptor(tag: Static.fullNameTag, type: .name, title: "Full Name")
        row.configuration.cell.appearance = ["textField.placeholder" : "John Doe" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject]
        row.configuration.cell.required = true
        section1.rows.append(row)
        
        row = FormRowDescriptor(tag: Static.emailTag, type: .email, title: "Email")
        row.configuration.cell.appearance = ["textField.placeholder" : "e.g johndoe@gmail.com" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject]
        row.configuration.cell.required = true
        section1.rows.append(row)
        
        form.sections = [section1]
        form.validateForm()
        
        self.form = form
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions