WordPress database error: [Can't create/write to file '/tmp/#sql-temptable-4db-155b79-418.MAI' (Errcode: 28 "No space left on device")]
SELECT p.*, o.option_value, GROUP_CONCAT(DISTINCT CONCAT(m.meta_key, "::", m.meta_value) separator "::::") as seo_meta, t.slug, tr.language_code as language FROM wp_posts p JOIN wp_postmeta m ON p.ID = m.post_id JOIN wp_options o ON o.option_name = "siteurl" JOIN wp_term_relationships r ON r.object_id = p.ID JOIN wp_term_taxonomy x ON x.term_taxonomy_id = r.term_taxonomy_id JOIN wp_terms t ON t.term_id = x.term_id JOIN wp_icl_translations tr ON p.ID = tr.element_id WHERE post_type = "page" AND post_status = "publish" AND tr.language_code = 'en' AND t.slug IN ('jquery') AND x.taxonomy = "page_cat" AND tr.element_type = "post_page" AND meta_key IN ("_yoast_wpseo_title", "_yoast_wpseo_metadesc") GROUP BY p.ID

WordPress database error: [Can't create/write to file '/tmp/#sql-temptable-4db-155b79-419.MAI' (Errcode: 28 "No space left on device")]
SHOW FULL COLUMNS FROM `wp_options`

invalidFeedback & Laravel Validation Issue

WordPress database error: [Can't create/write to file '/tmp/#sql-temptable-4db-155b79-41a.MAI' (Errcode: 28 "No space left on device")]
SELECT p.* FROM wp_mdb_forum_posts AS p LEFT JOIN wp_mdb_forum_posts AS q ON( q.Id = p.ParentId AND p.Id = q.AcceptedAnswerId ) WHERE p.PostTypeId = 2 AND p.ParentId = 108465 GROUP BY p.Id ORDER BY CASE WHEN q.Id IS NOT NULL THEN 1 ELSE 0 END DESC, p.UpvoteCount DESC, p.CreationDate ASC


Topic: invalidFeedback & Laravel Validation Issue

Tenarius asked 5 years ago

Problem: If the laravel-validation fails because no value is given in the form-field, everything works perfectly. But if it fails because the name-form-value is too long, the invalid feedback is not displayed.

My Question: What kind of influence do I have on the "invalidFeedback" so that it is displayed when I need it without writing further jQuery code like:

$("#form-name").removeClass("is-invalid");
$("#form-name-section .invalid-feedback").html("");
$("#form-name").addClass("is-invalid");
$("#form-name-section .invalid-feedback").html(errormessage);


Here is my code:

I can validate my incoming data in Laravel and, depending on the error, send various error messages back to the front end.

$data = request()->validate([
    'name' => 'bail|required|min:3|max:128',
    'email' => 'required|email',
    'message' => 'required',
    'privacy' => 'accepted'
]);

In response I get an object with the error notifications in vue-axios.

{
    name: ["My Error Message"],
    email: ["My Error Message"],
    message: ["My Error Message"],
    privacy: ["My Error Message"]
}

I save this in my prepared vue-error-data-object.

errors: {
    name: "",
    email: "",
    message: "",
    privacy: "",
}

And so.

let errors = e.response.data.errors;

this.errors.name = errors.name[0]
this.errors.email = errors.email[0]
this.errors.message = errors.message[0]
this.errors.privacy = errors.privacy[0]

Now I use the mdb-invalidFeedback and simply insert the error message.

<mdb-input 
    label="Your Name" 
    v-model="fields.name"
    :invalidFeedback="errors.name"
    required
/>


Regards


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 6.7.1
  • Device: PC
  • Browser: Firefox
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No