Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Uncaught TypeError: Cannot read property 'length' of undefined
- <script>
- ...
- ...
- .done(function (data) {
- if (data) {
- $.each(data.responseJSON, function (key, value) {
- var span = '#formCompany span[id=span-' + key + ']';
- $(span + '>strong').text(value);
- $(span).parent().parent().addClass('has-error');
- });
- }
- else {
- $(".alert-success").prop("hidden", false);
- }
- })
- .fail(function (data) {
- alert('The server failed somewhere');
- });
- </script>
- {
- "title":["The title field is required."],
- "content":["The content field is required."],
- ...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement