Soumettre la recherche
Mettre en ligne
Knockout validation
•
Télécharger en tant que PPTX, PDF
•
2 j'aime
•
6,801 vues
L
LearningTech
Suivre
Technologie
Art & Photos
Signaler
Partager
Signaler
Partager
1 sur 8
Télécharger maintenant
Recommandé
Q1 create a java desktop application to find the largest number among the t...
Q1 create a java desktop application to find the largest number among the t...
Manoj Bhakuni
Nirman Dave on why Python is the future of innovative technology!
Nirman Dave on why Python is the future of innovative technology!
nirman1234
Dynamically Evolving Systems: Cluster Analysis Using Time
Dynamically Evolving Systems: Cluster Analysis Using Time
Magnify Analytic Solutions
KEYNOTE: Node.js interactive 2017 - The case for node.js
KEYNOTE: Node.js interactive 2017 - The case for node.js
Justin Beckwith
False sharing 隱藏在多核系統的效能陷阱
False sharing 隱藏在多核系統的效能陷阱
Genchi Lu
利用Init connect做mysql clients stat 用户审计
利用Init connect做mysql clients stat 用户审计
Dehua Yang
Design Patterns in Micro-services architectures & Gilmour
Design Patterns in Micro-services architectures & Gilmour
Piyush Verma
Use C++ to Manipulate mozSettings in Gecko
Use C++ to Manipulate mozSettings in Gecko
Chih-Hsuan Kuo
Recommandé
Q1 create a java desktop application to find the largest number among the t...
Q1 create a java desktop application to find the largest number among the t...
Manoj Bhakuni
Nirman Dave on why Python is the future of innovative technology!
Nirman Dave on why Python is the future of innovative technology!
nirman1234
Dynamically Evolving Systems: Cluster Analysis Using Time
Dynamically Evolving Systems: Cluster Analysis Using Time
Magnify Analytic Solutions
KEYNOTE: Node.js interactive 2017 - The case for node.js
KEYNOTE: Node.js interactive 2017 - The case for node.js
Justin Beckwith
False sharing 隱藏在多核系統的效能陷阱
False sharing 隱藏在多核系統的效能陷阱
Genchi Lu
利用Init connect做mysql clients stat 用户审计
利用Init connect做mysql clients stat 用户审计
Dehua Yang
Design Patterns in Micro-services architectures & Gilmour
Design Patterns in Micro-services architectures & Gilmour
Piyush Verma
Use C++ to Manipulate mozSettings in Gecko
Use C++ to Manipulate mozSettings in Gecko
Chih-Hsuan Kuo
Clojure functions midje
Clojure functions midje
Jackson dos Santos Olveira
Azure sql insert perf
Azure sql insert perf
Mornè Blake
Mongo db updatedocumentusecases
Mongo db updatedocumentusecases
zarigatongy
Ft10 de smet
Ft10 de smet
nkaluva
Ejercicios
Ejercicios
leonharo
Testing in those hard to reach places
Testing in those hard to reach places
dn
The Ring programming language version 1.2 book - Part 41 of 84
The Ring programming language version 1.2 book - Part 41 of 84
Mahmoud Samir Fayed
The Ring programming language version 1.8 book - Part 67 of 202
The Ring programming language version 1.8 book - Part 67 of 202
Mahmoud Samir Fayed
Rsa
Rsa
nguoituyet
Angular2 rxjs
Angular2 rxjs
Christoffer Noring
Android getting started
Android getting started
Uptech
Metis - RubyConf 2011 Lightning Talk
Metis - RubyConf 2011 Lightning Talk
Ken Robertson
Rxjs vienna
Rxjs vienna
Christoffer Noring
The Return of JavaScript: 3 Open-Source Projects that are driving JavaScript'...
The Return of JavaScript: 3 Open-Source Projects that are driving JavaScript'...
Ben Teese
Trisha gee concurrentprogrammingusingthedisruptor
Trisha gee concurrentprogrammingusingthedisruptor
EthanTu
Tugas1
Tugas1
Av Ri
실시간 인벤트 처리
실시간 인벤트 처리
Byeongweon Moon
Understanding angular meteor
Understanding angular meteor
Entrepreneur / Startup
Node.js and angular js
Node.js and angular js
HyungKuIm
Sydney Python Presentation (Feb 2010) - Tracking Large Metallic Objects / Goo...
Sydney Python Presentation (Feb 2010) - Tracking Large Metallic Objects / Goo...
Kelvin Nicholson
Headless Js Testing
Headless Js Testing
Brian Moschel
Scaling Up: How Switching to Apache Spark Improved Performance, Realizability...
Scaling Up: How Switching to Apache Spark Improved Performance, Realizability...
Databricks
Contenu connexe
Tendances
Clojure functions midje
Clojure functions midje
Jackson dos Santos Olveira
Azure sql insert perf
Azure sql insert perf
Mornè Blake
Mongo db updatedocumentusecases
Mongo db updatedocumentusecases
zarigatongy
Ft10 de smet
Ft10 de smet
nkaluva
Ejercicios
Ejercicios
leonharo
Testing in those hard to reach places
Testing in those hard to reach places
dn
The Ring programming language version 1.2 book - Part 41 of 84
The Ring programming language version 1.2 book - Part 41 of 84
Mahmoud Samir Fayed
The Ring programming language version 1.8 book - Part 67 of 202
The Ring programming language version 1.8 book - Part 67 of 202
Mahmoud Samir Fayed
Rsa
Rsa
nguoituyet
Angular2 rxjs
Angular2 rxjs
Christoffer Noring
Android getting started
Android getting started
Uptech
Metis - RubyConf 2011 Lightning Talk
Metis - RubyConf 2011 Lightning Talk
Ken Robertson
Rxjs vienna
Rxjs vienna
Christoffer Noring
The Return of JavaScript: 3 Open-Source Projects that are driving JavaScript'...
The Return of JavaScript: 3 Open-Source Projects that are driving JavaScript'...
Ben Teese
Trisha gee concurrentprogrammingusingthedisruptor
Trisha gee concurrentprogrammingusingthedisruptor
EthanTu
Tugas1
Tugas1
Av Ri
실시간 인벤트 처리
실시간 인벤트 처리
Byeongweon Moon
Understanding angular meteor
Understanding angular meteor
Entrepreneur / Startup
Node.js and angular js
Node.js and angular js
HyungKuIm
Sydney Python Presentation (Feb 2010) - Tracking Large Metallic Objects / Goo...
Sydney Python Presentation (Feb 2010) - Tracking Large Metallic Objects / Goo...
Kelvin Nicholson
Tendances
(20)
Clojure functions midje
Clojure functions midje
Azure sql insert perf
Azure sql insert perf
Mongo db updatedocumentusecases
Mongo db updatedocumentusecases
Ft10 de smet
Ft10 de smet
Ejercicios
Ejercicios
Testing in those hard to reach places
Testing in those hard to reach places
The Ring programming language version 1.2 book - Part 41 of 84
The Ring programming language version 1.2 book - Part 41 of 84
The Ring programming language version 1.8 book - Part 67 of 202
The Ring programming language version 1.8 book - Part 67 of 202
Rsa
Rsa
Angular2 rxjs
Angular2 rxjs
Android getting started
Android getting started
Metis - RubyConf 2011 Lightning Talk
Metis - RubyConf 2011 Lightning Talk
Rxjs vienna
Rxjs vienna
The Return of JavaScript: 3 Open-Source Projects that are driving JavaScript'...
The Return of JavaScript: 3 Open-Source Projects that are driving JavaScript'...
Trisha gee concurrentprogrammingusingthedisruptor
Trisha gee concurrentprogrammingusingthedisruptor
Tugas1
Tugas1
실시간 인벤트 처리
실시간 인벤트 처리
Understanding angular meteor
Understanding angular meteor
Node.js and angular js
Node.js and angular js
Sydney Python Presentation (Feb 2010) - Tracking Large Metallic Objects / Goo...
Sydney Python Presentation (Feb 2010) - Tracking Large Metallic Objects / Goo...
Similaire à Knockout validation
Headless Js Testing
Headless Js Testing
Brian Moschel
Scaling Up: How Switching to Apache Spark Improved Performance, Realizability...
Scaling Up: How Switching to Apache Spark Improved Performance, Realizability...
Databricks
Scaling up data science applications
Scaling up data science applications
Kexin Xie
Mutation Testing: Testing your tests
Mutation Testing: Testing your tests
Stephen Leigh
JavaScript Test-Driven Development with Jasmine 2.0 and Karma
JavaScript Test-Driven Development with Jasmine 2.0 and Karma
Christopher Bartling
Aaron Bedra - Effective Software Security Teams
Aaron Bedra - Effective Software Security Teams
centralohioissa
Standford 2015 week3: Objective-C Compatibility, Property List, Views
Standford 2015 week3: Objective-C Compatibility, Property List, Views
彼得潘 Pan
Validating JSON -- Percona Live 2021 presentation
Validating JSON -- Percona Live 2021 presentation
Dave Stokes
DIWE - Advanced PHP Concepts
DIWE - Advanced PHP Concepts
Rasan Samarasinghe
Detection of errors and potential vulnerabilities in C and C++ code using the...
Detection of errors and potential vulnerabilities in C and C++ code using the...
Andrey Karpov
Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1
Troy Miles
All About JSON and ClickHouse - Tips, Tricks and New Features-2022-07-26-FINA...
All About JSON and ClickHouse - Tips, Tricks and New Features-2022-07-26-FINA...
Altinity Ltd
The Wonderful World of Apache Kafka
The Wonderful World of Apache Kafka
HostedbyConfluent
Angular js 24 april 2013 amsterdamjs
Angular js 24 april 2013 amsterdamjs
Marcin Wosinek
Unit test candidate solutions
Unit test candidate solutions
benewu
Jeroen Vloothuis Bend Kss To Your Will
Jeroen Vloothuis Bend Kss To Your Will
Vincenzo Barone
How to not write a boring test in Golang
How to not write a boring test in Golang
Dan Tran
Cassandra Summit 2015: Intro to DSE Search
Cassandra Summit 2015: Intro to DSE Search
Caleb Rackliffe
DataStax: An Introduction to DataStax Enterprise Search
DataStax: An Introduction to DataStax Enterprise Search
DataStax Academy
An Introduction to Property Based Testing
An Introduction to Property Based Testing
C4Media
Similaire à Knockout validation
(20)
Headless Js Testing
Headless Js Testing
Scaling Up: How Switching to Apache Spark Improved Performance, Realizability...
Scaling Up: How Switching to Apache Spark Improved Performance, Realizability...
Scaling up data science applications
Scaling up data science applications
Mutation Testing: Testing your tests
Mutation Testing: Testing your tests
JavaScript Test-Driven Development with Jasmine 2.0 and Karma
JavaScript Test-Driven Development with Jasmine 2.0 and Karma
Aaron Bedra - Effective Software Security Teams
Aaron Bedra - Effective Software Security Teams
Standford 2015 week3: Objective-C Compatibility, Property List, Views
Standford 2015 week3: Objective-C Compatibility, Property List, Views
Validating JSON -- Percona Live 2021 presentation
Validating JSON -- Percona Live 2021 presentation
DIWE - Advanced PHP Concepts
DIWE - Advanced PHP Concepts
Detection of errors and potential vulnerabilities in C and C++ code using the...
Detection of errors and potential vulnerabilities in C and C++ code using the...
Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1
All About JSON and ClickHouse - Tips, Tricks and New Features-2022-07-26-FINA...
All About JSON and ClickHouse - Tips, Tricks and New Features-2022-07-26-FINA...
The Wonderful World of Apache Kafka
The Wonderful World of Apache Kafka
Angular js 24 april 2013 amsterdamjs
Angular js 24 april 2013 amsterdamjs
Unit test candidate solutions
Unit test candidate solutions
Jeroen Vloothuis Bend Kss To Your Will
Jeroen Vloothuis Bend Kss To Your Will
How to not write a boring test in Golang
How to not write a boring test in Golang
Cassandra Summit 2015: Intro to DSE Search
Cassandra Summit 2015: Intro to DSE Search
DataStax: An Introduction to DataStax Enterprise Search
DataStax: An Introduction to DataStax Enterprise Search
An Introduction to Property Based Testing
An Introduction to Property Based Testing
Plus de LearningTech
vim
vim
LearningTech
PostCss
PostCss
LearningTech
ReactJs
ReactJs
LearningTech
Docker
Docker
LearningTech
Semantic ui
Semantic ui
LearningTech
node.js errors
node.js errors
LearningTech
Process control nodejs
Process control nodejs
LearningTech
Expression tree
Expression tree
LearningTech
SQL 效能調校
SQL 效能調校
LearningTech
flexbox report
flexbox report
LearningTech
Vic weekly learning_20160504
Vic weekly learning_20160504
LearningTech
Reflection & activator
Reflection & activator
LearningTech
Peggy markdown
Peggy markdown
LearningTech
Node child process
Node child process
LearningTech
20160415ken.lee
20160415ken.lee
LearningTech
Peggy elasticsearch應用
Peggy elasticsearch應用
LearningTech
Expression tree
Expression tree
LearningTech
Vic weekly learning_20160325
Vic weekly learning_20160325
LearningTech
D3js learning tips
D3js learning tips
LearningTech
git command
git command
LearningTech
Plus de LearningTech
(20)
vim
vim
PostCss
PostCss
ReactJs
ReactJs
Docker
Docker
Semantic ui
Semantic ui
node.js errors
node.js errors
Process control nodejs
Process control nodejs
Expression tree
Expression tree
SQL 效能調校
SQL 效能調校
flexbox report
flexbox report
Vic weekly learning_20160504
Vic weekly learning_20160504
Reflection & activator
Reflection & activator
Peggy markdown
Peggy markdown
Node child process
Node child process
20160415ken.lee
20160415ken.lee
Peggy elasticsearch應用
Peggy elasticsearch應用
Expression tree
Expression tree
Vic weekly learning_20160325
Vic weekly learning_20160325
D3js learning tips
D3js learning tips
git command
git command
Dernier
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
debabhi2
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
jfdjdjcjdnsjd
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Martijn de Jong
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Antenna Manufacturer Coco
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
Boston Institute of Analytics
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
wesley chun
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Principled Technologies
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
V3cube
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
Andrey Devyatkin
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
UK Journal
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
lior mazor
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
sammart93
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
hans926745
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
Dernier
(20)
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
Knockout validation
1.
JASON
2.
Knockout Validation A
KnockoutJS Plugin for model and property validation
3.
Native Rules Required
ko.observable().extend({ required: true }); Min ko.observable().extend({ min: 2 }); Max: ko.observable().extend({ max: 99 }); MinLength ko.observable().extend({ minLength: 3 }); MaxLength: ko.observable().extend({ maxLength: 12 }); Pattern: ko.observable().extend({ pattern: '^[a-z0-9].$' });
4.
Native Rules Date
ko.observable().extend({ date: true }); Email: ko.observable().extend({ email: true }); Equal: ko.observable().extend({ equal: 2 }); Not Equal: ko.observable().extend({ notEqual: 2 }); Number: ko.observable().extend({ number: true });
5.
Use var viewModel =
{ phone: ko.observable().extend({ required: true }); submit: function () { if (viewModel.errors().length == 0) { alert('Thank you.'); } else { viewModel.errors.showAllMessages(); } } }; viewModel.errors = ko.validation.group(viewModel); ko.validation.configure(); ko.applyBindingsWithValidation(viewModel);
6.
Custom Validation Rules ko.validation.rules['mustEqual']
= { validator: function (val, otherVal) { return val === otherVal; }, message: 'The field must equal {0}' }; ko.validation.registerExtenders(); var myCustomObj = ko.observable().extend({ mustEqual: 5 });
7.
Custom Message Template <script
id="customMessageTemplate" type="text/html"> <em class="customMessage" data-bind='validationMessage: field'></em> </script> <div data-bind='validationOptions: { messageTemplate: "customMessageTemplate" }'> …… </div>
8.
Configuration Option Default insertMessages true decorateElement
false errorMessageClass ‘validationMessage’ errorElementClass ‘validationElement’ errorsAsTitle true parseInputAttributes false errorClass null ko.validation.configure({ insertMessages: true, errorsAsTitle:true, errorElementClass: “errorClass", errorMessageClass: “errorMessageClass", decorateElement:true });
Télécharger maintenant