You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should these 2 lines of code return the same value ?
$form->hasMessagesFor('name');
$form->get('name')->hasMessages();
Before validation both these lines return false. But when the form validation fails, the first line returns true (which is good) while the second line still return false.
Thank you. I can see why that workaround would work, but I don't see the added benefit.
I'd much rather use hasMessagesFor() if It's not possible to get individual messages.
You can. I don't want to depend on forms so I don't.
I don't use the rendering behavior included with Phalcon. I use Bootstrap for UI. Sometimes I use complex forms (with columns and responsive). Sometimes I use element alone (ex. short inline form like search field).
My way to do is to have a "view helper" that can render an element depending on is type (select, checkbox, text input, email input...). It generates a "form-control" div (cf. http://getbootstrap.com/css/#forms) including "help text", "validation text", "input group", etc.
Should these 2 lines of code return the same value ?
Before validation both these lines return false. But when the form validation fails, the first line returns true (which is good) while the second line still return false.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: