Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Forum: Plugins
    In reply to: [WP MVC] Can’t use wpmvc

    Hi @robertpeake,
    I have three questions please :
    1-
    I defined validations for the fields of the model, Like below :

    class Student extends MvcModel {
    
      var $validate = array(
    'url' => array(
          'rule' => 'url',
          'required' => false,
          'message' => 'Please enter a valid URL in the URL field!'
        )
    );

    My question is : How to get the message and display it to the front End user?

    2-
    What’s the best practice to use the mvc_css_url() function to link a CSS style sheet (for example Bootstrap from a CDN or a Bootstrap local file), in a front view ; and can I put a <head> </head> tags in the front view Like this :

    <head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
        <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.20/datatables.min.css"/>
        <link rel="stylesheet" type="text/css" href="<?php  echo mvc_css_url('my_plugin', 'datatable');?>"/>
     
    <script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.20/datatables.min.js"></script>
    
        
    </head>
    
    <h2>List of students</h2><br>

    3- Upload of files :
    is there any validation rules for Files in wpmvc (type and size),

    Best Regards,
    TSMM Teacher

    Forum: Fixing WordPress
    In reply to: wp mvc Framework
    Thread Starter fehmib

    (@fehmib)

    Thank you @joyously

    Forum: Plugins
    In reply to: [WP MVC] Can’t use wpmvc

    Hi,
    I have three questions please :
    1-
    I defined validations for the fields of the model, Like below :

    
    class Student extends MvcModel {
    
      var $validate = array(
    'url' => array(
          'rule' => 'url',
          'required' => false,
          'message' => 'Please enter a valid URL in the URL field!'
        )
    );

    My question is : How to get the message and display it to the front End user?

    2-
    What’s the best practice to use the mvc_css_url() function to link a CSS style sheet (for example Bootstrap from a CDN or a Bootstrap local file), in a front view ; and can I put a <head> </head> tags in the front view Like this :

    <head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
        <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.20/datatables.min.css"/>
        <link rel="stylesheet" type="text/css" href="<?php  echo mvc_css_url('my_plugin', 'datatable');?>"/>
     
    <script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.20/datatables.min.js"></script>
    
        
    </head>
    
    <h2>List of students</h2><br>

    3 Upload of file :
    is there any validation rule for Files in wpmvc (type and size),

    Best Regards,
    TSMM Teacher

    Forum: Plugins
    In reply to: [WP MVC] Can’t use wpmvc

    Thank you very much @robertpeake

    Forum: Plugins
    In reply to: [WP MVC] Can’t use wpmvc

    is there any example of redirection with this framework (like header(‘location:…’) in native PHP,
    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)