Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
idatt2106-2024-07
frontend
Merge requests
!9
Feat/login
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Feat/login
feat/Login
into
main
Overview
0
Commits
4
Pipelines
1
Changes
7
Merged
Jens Christian Aanestad
requested to merge
feat/Login
into
main
1 year ago
Overview
0
Commits
4
Pipelines
1
Changes
7
Expand
Fixed validation in login component along with the sign up component.
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
e70ad5d5
4 commits,
1 year ago
7 files
+
193
−
26
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
7
Search (e.g. *.vue) (Ctrl+P)
src/components/InputFields/BaseInput.vue
+
18
−
3
Options
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
const
emit
=
defineEmits
([
'
inputChangeEvent
'
]);
const
props
=
defineProps
({
const
props
=
defineProps
({
label
:
{
label
:
{
type
:
String
,
type
:
String
,
@@ -16,19 +17,33 @@ const props = defineProps({
@@ -16,19 +17,33 @@ const props = defineProps({
inputId
:
{
inputId
:
{
type
:
String
,
type
:
String
,
required
:
true
required
:
true
},
modelValue
:
{
type
:
String
,
default
:
""
},
isValid
:
{
type
:
Boolean
,
default
:
false
}
}
});
});
const
onInputEvent
=
(
event
:
any
)
=>
{
emit
(
'
inputChangeEvent
'
,
event
.
target
.
value
)
}
</
script
>
</
script
>
<
template
>
<
template
>
<div>
<div>
<label
:for=
"inputId"
>
{{
label
}}
</label>
<label
:for=
"inputId"
>
{{
label
}}
</label>
<input
:type=
"props.type"
<input
:value=
"props.modelValue"
@
input=
"onInputEvent"
:type=
"props.type"
class=
"form-control"
class=
"form-control"
:placeholder=
"props.placeholder"
:placeholder=
"props.placeholder"
:id=
"inputId"
required
/>
:id=
"inputId"
required
/>
<div
class=
"invalid-feedback"
>
Invalid
{{
label
}}
</div>
<div
v-if=
"props.isValid"
class=
"invalid-feedback"
>
Invalid
{{
label
}}
</div>
<div
class=
"valid-feedback"
>
Correct
{{
label
}}
</div>
<div
v-else
class=
"valid-feedback"
>
Valid
{{
label
}}
</div>
</div>
</div>
</
template
>
</
template
>
Loading