-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PayTo - Field validation #2019
PayTo - Field validation #2019
Conversation
COAND-1058
firstName, | ||
Validation.Valid | ||
) | ||
private fun validateFirstName(firstName: String): FieldState<String> = if (firstName.isNotEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check for isNotBlank()
instead maybe?
private val PHONE_NUMBER_PATTERN = Pattern.compile(PHONE_NUMBER_REGEX) | ||
|
||
@Suppress("ktlint:standard:max-line-length", "MaxLineLength") | ||
private const val EMAIL_ADDRESS_REGEX = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In ValidationUtils
we also have regexes for phone numbers and emails. Would it be possible to reuse those?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The email regex has been reused, but we should keep the phone number regex.
4125b59
to
3772fcf
Compare
COAND-1058
3772fcf
to
2079e0d
Compare
✅ No public API changes |
|
Description
Add validation for PayTo fields
Checklist
COAND-1058