M
M
Mikha Pankratov2015-12-11 17:44:08
Yii
Mikha Pankratov, 2015-12-11 17:44:08

How to execute save() without validation?

Hi,
I have validation rules set - but when adding additional fields. It works and prevents me from adding more empty inputs to the form - how do I do $model->save() without validation?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vyacheslav, 2015-12-11
@frmax

$model->save(false)

A
Alexander, 2015-12-11
@Sassoft

Not so good, better write two scripts.. validation should always work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question