Version 0.0.5
Refactored Architecture
This release contains breaking changes and introduces a more SwiftUI oriented architecture.
struct LoginView: View {
@Validated(!.isEmpty && .isEmail)
var mailAddress = String()
@Validated(.range(8...))
var password = String()
var body: some View {
List {
TextField("E-Mail", text: self.$mailAddress)
TextField("Password", text: self.$password)
Button(
action: {
print("Login", self.mailAddress, self.password)
},
label: {
Text("Submit")
}
)
.validated(
self._mailAddress,
self._password
)
}
}
}