lumoz / codeigniter-form-validation Goto Github PK
View Code? Open in Web Editor NEWCodeIgniter library for fields form validation. It is independent of the standard library of CodeIgniter and can also be used for Ajax calls.
CodeIgniter library for fields form validation. It is independent of the standard library of CodeIgniter and can also be used for Ajax calls.
is it possible to validate array of same named fields?
The function for minimum length validation minlen() does not retrin value,
update you code at line 360
$this->_error($err_msg, $v);
hey,
if you could, provide an option to help return the field name or an option to pass field name to be returned
Sample code
public function equal($field_1, $field_2, $err_msg = '', $returnField=2){
.......
}
here returnField can either be the name of field to be returned or numeric position of fields as passed. Default can be 2 will return $field_2.
thank you
if i use checked for a checkbox, it wont work. Since the checkbox is never posted if its not checked. so this needs a change.
example if i have a radio button that save 0 has no and 1 as yes.
So if user has selected NO that has value 0.
The "required" function will still takes it as "No input is provided" and returns the error.
The reuqired function uses empty() thus empty(0) also returns true.
so chnage line 218
from
if (empty($this->data[$v])) {
to
if (empty($this->data[$v]) && strlen($this->data[$v])==0) {
solves the problem
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.