#5 Improve validation logic

Nyitott
megnyitva ekkor: 5 éve libsys által · 1 hozzászólás
/lib/sys hozzászólt 5 éve

1- Triggering validation automatically previous to CRUD operations makes this operations difficult to extend, since validation would be triggered after the custom behavior if you call parent::operation() on the last line of the method.

2- Rules use to be different previous to insertion than after insertion.

3- As rules are static it's impossible to validate based on dynamic data.

Still I think validation rules belong to models. One approach could be to craft a pre-insertion and a post-insertion validation method. An approach could be to

1- Triggering validation automatically previous to CRUD operations makes this operations difficult to extend, since validation would be triggered after the custom behavior if you call `parent::operation()` on the last line of the method. 2- Rules use to be different previous to insertion than after insertion. 3- As rules are static it's impossible to validate based on dynamic data. Still I think validation rules belong to models. One approach could be to craft a pre-insertion and a post-insertion validation method. An approach could be to
/lib/sys hozzászólt 5 éve
Tulajdonos

Wow! That approach seems very convincing to me, but I think it would be better to

Wow! That approach seems very convincing to me, but I think it would be better to
Jelentkezzen be hogy csatlakozhasson a beszélgetéshez.
Nincs címke
Nincs mérföldkő
Nincs megbízott
1 Résztvevő
Töltés...
Mégse
Mentés
Még nincs tartalom.