Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wp-forms
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
Container 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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
wp-forms
Merge requests
!19
Add strong typing for 3.0 version
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Add strong typing for 3.0 version
feature/strong-typing
into
devel
Overview
4
Commits
47
Pipelines
1
Changes
2
Merged
Krzysztof Dyszczyk
requested to merge
feature/strong-typing
into
devel
3 years ago
Overview
3
Commits
47
Pipelines
1
Changes
2
0
0
Merge request reports
Viewing commit
d6db5862
Prev
Next
Show latest version
2 files
+
34
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Unverified
d6db5862
feat: add email input field
· d6db5862
Bartek Jaskulski
authored
3 years ago
src/Field/InputEmailField.php
0 → 100644
+
22
−
0
View file @ d6db5862
Edit in single-file editor
Open in Web IDE
<?php
namespace
WPDesk\Forms\Field
;
use
WPDesk\Forms\Sanitizer
;
use
WPDesk\Forms\Sanitizer\EmailSanitizer
;
class
InputEmailField
extends
BasicField
{
public
function
__construct
()
{
parent
::
__construct
();
$this
->
set_default_value
(
''
);
$this
->
set_attribute
(
'type'
,
'email'
);
}
public
function
get_sanitizer
():
Sanitizer
{
return
new
EmailSanitizer
();
}
public
function
get_template_name
():
string
{
return
'input-text'
;
}
}
Loading