When i use Form Helper of Cakephp, it can be validated in Model with many rules like this: (for example)
$this->validate = array(
"name" => array(
"rule" => "notBlank",
"message" => "Name not empty !",
),
"email" => array(
"rule" => "notBlank",
"message" => "Email not empty !",
),
);
Bootstrap Form:
<form>
<div class="form-group">
<label for="name">Name:</label>
<input type="text" name="name" class="form-control" id="name" placeholder="Enter name">
</div>
<div class="form-group">
<label for="email">Email:</label>
<input type="email" name="email" class="form-control" id="email" placeholder="Enter email">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
. But when i use Form created in Bootstrap, the validation is not occured.
How to fix that????
if you use Form helper then your input field name should be
name="data[Modelname][fieldname]"
Base on it your code should be (if your model isUsers
)Details is Here