Enviar pesquisa
Carregar
FormValidator::LazyWay で検証ルールをまとめよう
•
0 gostou
•
1,581 visualizações
Daisuke Komatsu
Seguir
CPAN モジュールの FormValidator::LazyWay について
Leia menos
Leia mais
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 48
Baixar agora
Baixar para ler offline
Recomendados
TerminalでTwitter
TerminalでTwitter
Yoshihiro Sugi
Topological indices (t is) of the graphs to seek qsar models of proteins com...
Topological indices (t is) of the graphs to seek qsar models of proteins com...
Jitendra Kumar Gupta
与 PHP 和 Perl 使用 MySQL 数据库
与 PHP 和 Perl 使用 MySQL 数据库
YUCHENG HU
wget.pl
wget.pl
Yasuhiro Onishi
C++ Programming - 6th Study
C++ Programming - 6th Study
Chris Ohk
C++ Programming - 7th Study
C++ Programming - 7th Study
Chris Ohk
Database Management - Lecture 4 - PHP and Mysql
Database Management - Lecture 4 - PHP and Mysql
Al-Mamun Sarkar
Groovy as a scripting language
Groovy as a scripting language
Jenn Strater
Recomendados
TerminalでTwitter
TerminalでTwitter
Yoshihiro Sugi
Topological indices (t is) of the graphs to seek qsar models of proteins com...
Topological indices (t is) of the graphs to seek qsar models of proteins com...
Jitendra Kumar Gupta
与 PHP 和 Perl 使用 MySQL 数据库
与 PHP 和 Perl 使用 MySQL 数据库
YUCHENG HU
wget.pl
wget.pl
Yasuhiro Onishi
C++ Programming - 6th Study
C++ Programming - 6th Study
Chris Ohk
C++ Programming - 7th Study
C++ Programming - 7th Study
Chris Ohk
Database Management - Lecture 4 - PHP and Mysql
Database Management - Lecture 4 - PHP and Mysql
Al-Mamun Sarkar
Groovy as a scripting language
Groovy as a scripting language
Jenn Strater
PHP Lecture 4 - Working with form, GET and Post Methods
PHP Lecture 4 - Working with form, GET and Post Methods
Al-Mamun Sarkar
First step of Performance Tuning
First step of Performance Tuning
risou
Php
Php
Uthpala Bowalgaha
PHP Lecture 6 - Php file uploading
PHP Lecture 6 - Php file uploading
Al-Mamun Sarkar
Dependency Injection
Dependency Injection
Rifat Nabi
[Php] navigations
[Php] navigations
Thai Pham
[Php] navigations
[Php] navigations
Vishal Gurujuwada
ETL for Pros: Getting Data Into MongoDB
ETL for Pros: Getting Data Into MongoDB
MongoDB
introduction to Django in five slides
introduction to Django in five slides
Dan Chudnov
MongoDB a document store that won't let you down.
MongoDB a document store that won't let you down.
Nurul Ferdous
"Powerful Analysis with the Aggregation Pipeline (Tutorial)"
"Powerful Analysis with the Aggregation Pipeline (Tutorial)"
MongoDB
Php 2
Php 2
tnngo2
Path::Tiny
Path::Tiny
waniji
MongoDB World 2019: Aggregation Pipeline Power++: How MongoDB 4.2 Pipeline Em...
MongoDB World 2019: Aggregation Pipeline Power++: How MongoDB 4.2 Pipeline Em...
MongoDB
MongoDB .local Bengaluru 2019: Aggregation Pipeline Power++: How MongoDB 4.2 ...
MongoDB .local Bengaluru 2019: Aggregation Pipeline Power++: How MongoDB 4.2 ...
MongoDB
MongoDBと位置情報 ~地理空間インデックスの紹介
MongoDBと位置情報 ~地理空間インデックスの紹介
Koji Iwazaki
San Francisco Java User Group
San Francisco Java User Group
kchodorow
Jina Bolton
Jina Bolton
Carsonified Team
8. Php MongoDB stergerea unui document
8. Php MongoDB stergerea unui document
Razvan Raducanu, PhD
Object oriented mysqli connection function
Object oriented mysqli connection function
clickon2010
Presentacio Mobile World Congress
Presentacio Mobile World Congress
Citilab Cornella
Els bolets
Els bolets
iescastellbisbal
Mais conteúdo relacionado
Mais procurados
PHP Lecture 4 - Working with form, GET and Post Methods
PHP Lecture 4 - Working with form, GET and Post Methods
Al-Mamun Sarkar
First step of Performance Tuning
First step of Performance Tuning
risou
Php
Php
Uthpala Bowalgaha
PHP Lecture 6 - Php file uploading
PHP Lecture 6 - Php file uploading
Al-Mamun Sarkar
Dependency Injection
Dependency Injection
Rifat Nabi
[Php] navigations
[Php] navigations
Thai Pham
[Php] navigations
[Php] navigations
Vishal Gurujuwada
ETL for Pros: Getting Data Into MongoDB
ETL for Pros: Getting Data Into MongoDB
MongoDB
introduction to Django in five slides
introduction to Django in five slides
Dan Chudnov
MongoDB a document store that won't let you down.
MongoDB a document store that won't let you down.
Nurul Ferdous
"Powerful Analysis with the Aggregation Pipeline (Tutorial)"
"Powerful Analysis with the Aggregation Pipeline (Tutorial)"
MongoDB
Php 2
Php 2
tnngo2
Path::Tiny
Path::Tiny
waniji
MongoDB World 2019: Aggregation Pipeline Power++: How MongoDB 4.2 Pipeline Em...
MongoDB World 2019: Aggregation Pipeline Power++: How MongoDB 4.2 Pipeline Em...
MongoDB
MongoDB .local Bengaluru 2019: Aggregation Pipeline Power++: How MongoDB 4.2 ...
MongoDB .local Bengaluru 2019: Aggregation Pipeline Power++: How MongoDB 4.2 ...
MongoDB
MongoDBと位置情報 ~地理空間インデックスの紹介
MongoDBと位置情報 ~地理空間インデックスの紹介
Koji Iwazaki
San Francisco Java User Group
San Francisco Java User Group
kchodorow
Jina Bolton
Jina Bolton
Carsonified Team
8. Php MongoDB stergerea unui document
8. Php MongoDB stergerea unui document
Razvan Raducanu, PhD
Object oriented mysqli connection function
Object oriented mysqli connection function
clickon2010
Mais procurados
(20)
PHP Lecture 4 - Working with form, GET and Post Methods
PHP Lecture 4 - Working with form, GET and Post Methods
First step of Performance Tuning
First step of Performance Tuning
Php
Php
PHP Lecture 6 - Php file uploading
PHP Lecture 6 - Php file uploading
Dependency Injection
Dependency Injection
[Php] navigations
[Php] navigations
[Php] navigations
[Php] navigations
ETL for Pros: Getting Data Into MongoDB
ETL for Pros: Getting Data Into MongoDB
introduction to Django in five slides
introduction to Django in five slides
MongoDB a document store that won't let you down.
MongoDB a document store that won't let you down.
"Powerful Analysis with the Aggregation Pipeline (Tutorial)"
"Powerful Analysis with the Aggregation Pipeline (Tutorial)"
Php 2
Php 2
Path::Tiny
Path::Tiny
MongoDB World 2019: Aggregation Pipeline Power++: How MongoDB 4.2 Pipeline Em...
MongoDB World 2019: Aggregation Pipeline Power++: How MongoDB 4.2 Pipeline Em...
MongoDB .local Bengaluru 2019: Aggregation Pipeline Power++: How MongoDB 4.2 ...
MongoDB .local Bengaluru 2019: Aggregation Pipeline Power++: How MongoDB 4.2 ...
MongoDBと位置情報 ~地理空間インデックスの紹介
MongoDBと位置情報 ~地理空間インデックスの紹介
San Francisco Java User Group
San Francisco Java User Group
Jina Bolton
Jina Bolton
8. Php MongoDB stergerea unui document
8. Php MongoDB stergerea unui document
Object oriented mysqli connection function
Object oriented mysqli connection function
Destaque
Presentacio Mobile World Congress
Presentacio Mobile World Congress
Citilab Cornella
Els bolets
Els bolets
iescastellbisbal
Leadership Turlock
Leadership Turlock
stancofair
Attitude is everything
Attitude is everything
Antonino Lagnada
Living%20 Labs E Almirall
Living%20 Labs E Almirall
Citilab Cornella
Tabla Frecuencia De Medida De Arboles
Tabla Frecuencia De Medida De Arboles
Jorge Pineda
Our Library
Our Library
bfant
lady gaga
lady gaga
Jorge Pineda
Tabla Frecuencia De Medida De Arboles
Tabla Frecuencia De Medida De Arboles
Jorge Pineda
Szczecin
Szczecin
guestffd69
Titi Escalante
Titi Escalante
centroamerica21
Python for Scientists
Python for Scientists
Andreas Dewes
Viatge final 4t
Viatge final 4t
iescastellbisbal
Plucore way of using Catalyst
Plucore way of using Catalyst
Daisuke Komatsu
Attitude is everything
Attitude is everything
Antonino Lagnada
自社開発をしていなかった会社が Python を選んだ理由
自社開発をしていなかった会社が Python を選んだ理由
Daisuke Komatsu
Searching the Internet
Searching the Internet
guest32ae6
HR
HR
Amrit Chaudhari
Corporate-Espionage
Corporate-Espionage
Sam
Destaque
(19)
Presentacio Mobile World Congress
Presentacio Mobile World Congress
Els bolets
Els bolets
Leadership Turlock
Leadership Turlock
Attitude is everything
Attitude is everything
Living%20 Labs E Almirall
Living%20 Labs E Almirall
Tabla Frecuencia De Medida De Arboles
Tabla Frecuencia De Medida De Arboles
Our Library
Our Library
lady gaga
lady gaga
Tabla Frecuencia De Medida De Arboles
Tabla Frecuencia De Medida De Arboles
Szczecin
Szczecin
Titi Escalante
Titi Escalante
Python for Scientists
Python for Scientists
Viatge final 4t
Viatge final 4t
Plucore way of using Catalyst
Plucore way of using Catalyst
Attitude is everything
Attitude is everything
自社開発をしていなかった会社が Python を選んだ理由
自社開発をしていなかった会社が Python を選んだ理由
Searching the Internet
Searching the Internet
HR
HR
Corporate-Espionage
Corporate-Espionage
Semelhante a FormValidator::LazyWay で検証ルールをまとめよう
Data::FormValidator Simplified
Data::FormValidator Simplified
Fred Moyer
Daily notes
Daily notes
meghendra168
20 modules i haven't yet talked about
20 modules i haven't yet talked about
Tatsuhiko Miyagawa
Adventures in Optimization
Adventures in Optimization
David Golden
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Masahiro Nagano
Bag Of Tricks From Iusethis
Bag Of Tricks From Iusethis
Marcus Ramberg
SOLID in Practice
SOLID in Practice
Jessica Mauerhan
The Zen of Lithium
The Zen of Lithium
Nate Abele
Solid in practice
Solid in practice
Jessica Mauerhan
Php functions
Php functions
JIGAR MAKHIJA
Forms in AngularJS
Forms in AngularJS
Eyal Vardi
Why Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary Thing
Chris Reynolds
C A S Sample Php
C A S Sample Php
JH Lee
Perl6 in-production
Perl6 in-production
Andrew Shitov
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
Masahiro Nagano
Php code for online quiz
Php code for online quiz
hnyb1002
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
Kang-min Liu
全裸でワンライナー(仮)
全裸でワンライナー(仮)
Yoshihiro Sugi
究極のコントローラを目指す
究極のコントローラを目指す
Yasuo Harada
Php.docx
Php.docx
CHMuhammadZohaibZafa
Semelhante a FormValidator::LazyWay で検証ルールをまとめよう
(20)
Data::FormValidator Simplified
Data::FormValidator Simplified
Daily notes
Daily notes
20 modules i haven't yet talked about
20 modules i haven't yet talked about
Adventures in Optimization
Adventures in Optimization
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Bag Of Tricks From Iusethis
Bag Of Tricks From Iusethis
SOLID in Practice
SOLID in Practice
The Zen of Lithium
The Zen of Lithium
Solid in practice
Solid in practice
Php functions
Php functions
Forms in AngularJS
Forms in AngularJS
Why Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary Thing
C A S Sample Php
C A S Sample Php
Perl6 in-production
Perl6 in-production
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
Php code for online quiz
Php code for online quiz
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
全裸でワンライナー(仮)
全裸でワンライナー(仮)
究極のコントローラを目指す
究極のコントローラを目指す
Php.docx
Php.docx
Último
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
WSO2
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
apidays
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
danishmna97
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Deepika Singh
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
sudhanshuwaghmare1
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Jeffrey Haguewood
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Angeliki Cooney
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Edi Saputra
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
apidays
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Remote DBA Services
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
Andrey Devyatkin
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
MadyBayot
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
Elevate Developer Efficiency & build GenAI Application with Amazon Q
Elevate Developer Efficiency & build GenAI Application with Amazon Q
Bhuvaneswari Subramani
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
apidays
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Zilliz
Último
(20)
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Elevate Developer Efficiency & build GenAI Application with Amazon Q
Elevate Developer Efficiency & build GenAI Application with Amazon Q
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
FormValidator::LazyWay で検証ルールをまとめよう
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
my $config =
{ rules => [ 'Email', 'String' ], setting => { strict => { email => { rule => ['Email#email'] }, password => { rule => [ { 'String#length' => { 'min' => '4', 'max' => '12' } }, 'String#ascii' ] }, } }, lang => 'ja', labels => { ja => { email => ' ', password => ' ' } }, };
26.
use FormValidator::LazyWay; my $fv
= FormValidator::LazyWay->new($config); my $result = $fv->check($q, { required => [qw/nickname email password/], optional => [qw/message/] });
27.
my $result =
$fv->check($q, { required => [qw/title/], optional => [qw/body/] }); my $result = $fv->check($q, { optional => [qw/title body/] });
28.
my $result =
$fv->check($q, { required => [qw/nickname email password/], optional => [qw/message/] }); if ( $result->has_error ) { print Dumper $result->error_message; # output #$VAR1 = { # 'email' => ' ', # 'password' => ' 4 12 ' #}; } else { # OK! print Dumper $result->valid; }
29.
setting:
my $result = $fv->check( $cgi, strict: { required => [qw/email/], email: level => { email => 'loose' rule: } - Email#email } loose: ); email: rule: - Email#email_loose
30.
setting: regexp_map:
'_id$': rule: - Number#integer
31.
merge: date:
format: "%04d-%02d-%02d" fields: - year - month - day strict: date: rule: - DateTime#date
32.
33.
34.
setting: strict:
date: filter: - Unify#hyphen rule: - DateTime#date fix: - DateTime#format: - '%Y-%m-%d'
35.
my $result =
$fv->check($q, { required => [qw/nickname email password/], optional => [qw/message/] }); if ( $result->has_error ) { print Dumper $res->error_message; } # DateTime print $result->valid->{date};
36.
my $result =
$fv->check($q, { required => [qw/nickname email password/], optional => [qw/message/] }); $result->custom_invalid( 'email_not_unique', ' ' ); if ( $res->has_error ) { print Dumper $res->error_message; }
37.
my $wants_to_validate =
{ nickname => 'vkgtaro', email => 'vkg.taro@gmail.com', password => 'mypass', }; my $result = $fv->check($q, { required => [qw/nickname email password/], optional => [qw/message/], custom_parameters => $wants_to_validate, });
38.
39.
40.
41.
42.
43.
44.
messages :
ja : rule_message : __field__ __rule__ rule : Email#email : String#length : $_[min] $_[max]
45.
messages :
ja : rule_message : __field__ __rule__ rule : Email#email : String#length : $_[min] $_[max]
Baixar agora