FormValidator

public class FormValidator

The FormValidator allows to evaluate sign up forms easily. Simply provide email, password and the type of validation you
want to specify for the given password.
FormValidator is only mean't to be used for Sign up forms.
  • Empty constructor.

    Declaration

    Swift

    public init()
  • Validates the password with the given validation types and minimum Characters.

    Declaration

    Swift

    public func isValid(_ password: String, validators: [ValidationType]) -> Bool

    Parameters

    password

    The email given.

    validators

    The validators for your password.

  • Validates the email and password with the given validation types and minimum characters.

    Declaration

    Swift

    public func isValid(_ email: String, password: String, validators: [ValidationType]) -> Bool

    Parameters

    email

    the email given.

    password

    The password given.

    validators

    The validators for your password.

  • Validates the email, password and confirmation password with the given validation types and minimum characters.

    Declaration

    Swift

    public func isValid(_ email: String,
                               password: String,
                               confirmationPassword: String,
                               validators: [ValidationType]) -> Bool

    Parameters

    email

    the email given.

    password

    The password given.

    confirmationPassword

    The confirmation password given.

    validators

    The validators for your password.

  • Validates the email and password with the given password regex code.

    Declaration

    Swift

    public func isValid(_ email: String, password: String, passwordRegex: String) -> Bool

    Parameters

    email

    the email given.

    password

    The password given.

    passwordRegex

    The password regex code.

  • Validates the email, password and confirmation password with the given password regex code.

    Declaration

    Swift

    public func isValid(_ email: String,
                               password: String,
                               confirmationPassword: String,
                               passwordRegex: String) -> Bool

    Parameters

    email

    the email given.

    password

    The password given.

    confirmationPassword

    The confirmation password given.

    passwordRegex

    The password regex code.

  • Validates the password with the given regex code.

    Declaration

    Swift

    public func isValid(_ password: String, passwordRegex: String) -> Bool

    Parameters

    password

    The password given.

    passwordRegex

    The password regex code.

  • Validates the Email.

    Declaration

    Swift

    public func isValid(_ email: String) -> Bool

    Parameters

    email

    the email given.