Enviar búsqueda
Cargar
FormValidator::LazyWay で検証ルールをまとめよう
•
0 recomendaciones
•
1,581 vistas
Daisuke Komatsu
Seguir
CPAN モジュールの FormValidator::LazyWay について
Leer menos
Leer más
Tecnología
Denunciar
Compartir
Denunciar
Compartir
1 de 48
Descargar ahora
Descargar para leer sin conexión
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
Más contenido relacionado
La actualidad más candente
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
La actualidad más candente
(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
Destacado
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
Destacado
(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
Similar 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
Similar 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
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
Curtis Poe
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Fwdays
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
Hervé Boutemy
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Mark Simos
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Rizwan Syed
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
Fwdays
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Addepto
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
Alex Barbosa Coqueiro
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Zilliz
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Scott Keck-Warren
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Kalema Edgar
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
null - The Open Security Community
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
Sri Ambati
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
Stephanie Beckett
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Lonnie McRorey
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Florian Wilhelm
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
charlottematthew16
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
Fwdays
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
hariprasad279825
Último
(20)
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
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]
Descargar ahora