-
Notifications
You must be signed in to change notification settings - Fork 100
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
Add subtypes for short input, like email, phone or custom regex #1491
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1491 +/- ##
============================================
+ Coverage 42.98% 43.96% +0.97%
- Complexity 614 646 +32
============================================
Files 58 58
Lines 2489 2550 +61
============================================
+ Hits 1070 1121 +51
- Misses 1419 1429 +10 |
48746b6
to
6f08e0f
Compare
6f08e0f
to
3aa824e
Compare
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.
Very cool, looks good design-wise! :)
Optional detail: "Telephone number" sounds a bit off and could be shortened to "Phone number".
d35c918
to
c7416e9
Compare
Thank you :)
I agree! Changed it. |
c7416e9
to
2980833
Compare
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.
Huhh, that was a big one.
Sorry for that mass of comments, but it feels necessary. 🙈
Especially on the two contants files, there is on each one a bigger structure-comment. Maybe check them first. Most of the others are smaller things.
d7facfc
to
9354320
Compare
0edb495
to
2cb5fe5
Compare
01cd255
to
7d78653
Compare
7d78653
to
de5a595
Compare
b0f1e3f
to
817d7d3
Compare
7cab21f
to
4056b07
Compare
4056b07
to
76ccb29
Compare
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.
I will try it in my dev instance this evening, but codewise looks good now :)
10fad45
to
50f8e40
Compare
* Add fallback validation for short input Some browsers do not provide input validation for all available types, e.g. firefox on desktop does not validate telephone numbers. * Clicking the input should enable edit mode on create view Co-authored-by: Chartman123 <chris-hartmann@gmx.de> Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* Also validate `extraSettings` especially the regex for custom short input Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
50f8e40
to
22bf12b
Compare
Summary
Added sub types for the short input, optional types (fallback to normal text input):
Added validation fallbacks on the front end as not every browser supports those input types, so if they are not supported we still get some validation.
Regex are validated on front and back end to be compatible with both PCRE (PHP) and ECMA (JS).
Front end
vokoscreenNG-2023-02-08_12-07-19.mp4
Known issues
@nextcloud/vue
release, see No background fortertiary-no-background
NcActions
nextcloud-libraries/nextcloud-vue#3724