MV framework logo
  • Architecture
  • Philosophy
  • Admin panel
  • Support
  • Feedback
Documentation
Download .zip version 3.2.0 from 25.12.2024
  • Architecture
  • Philosophy
  • Admin panel
  • Support
  • Feedback
Getting started
  • Installation and launch
  • Folder structure
  • Launching a simple website
  • Pre-installed models
  • SQLite getting started
  • System settings
  • Migrations
  • Debugging
Models
  • General principles of models
  • Data types
    • General characteristics
    • Boolean
    • String char
    • Numeric: int, float, order
    • Special string: url, redirect, email, phone
    • Password
    • Text
    • Date and time
    • File and image
    • Array of images
    • Choice enum
    • Parent
    • Many to one
    • Many to many
    • Group
  • Model setup
  • Simple models
  • Foreign keys
  • Trees
  • Many to many
  • Group
  • Records management
  • Managing simple models
  • Additional features
Templates and routing
  • General principles of templates
  • Router object
  • MV object
  • Create a new template
  • Output of data in template
  • Record object
  • Files and images
  • Date and time
  • Redirects and http
  • Sending email
  • Special methods
Forms
  • Creating forms
  • Setting up form fields
  • Validating form fields
  • Form security
  • Working with form data
  • Using data from models
  • Form methods
SQL queries
  • Query builder
  • Direct queries
  • Pagination
  • Sorting
  • Filtration
Additional
  • AJAX
  • Plugins
  • Caching
  • Security
  • Admin panel add-ons
Documentation
Getting started
  • Installation and launch
  • Folder structure
  • Launching a simple website
  • Pre-installed models
  • SQLite getting started
  • System settings
  • Migrations
  • Debugging
Models
  • General principles of models
  • Data types
    • General characteristics
    • Boolean
    • String char
    • Numeric: int, float, order
    • Special string: url, redirect, email, phone
    • Password
    • Text
    • Date and time
    • File and image
    • Array of images
    • Choice enum
    • Parent
    • Many to one
    • Many to many
    • Group
  • Model setup
  • Simple models
  • Foreign keys
  • Trees
  • Many to many
  • Group
  • Records management
  • Managing simple models
  • Additional features
Templates and routing
  • General principles of templates
  • Router object
  • MV object
  • Create a new template
  • Output of data in template
  • Record object
  • Files and images
  • Date and time
  • Redirects and http
  • Sending email
  • Special methods
Forms
  • Creating forms
  • Setting up form fields
  • Validating form fields
  • Form security
  • Working with form data
  • Using data from models
  • Form methods
SQL queries
  • Query builder
  • Direct queries
  • Pagination
  • Sorting
  • Filtration
Additional
  • AJAX
  • Plugins
  • Caching
  • Security
  • Admin panel add-ons
MV tracker

String char

Purpose: single words, any values, short text strings
Field type in SQL table: char and varchar

Additional parameters:

length
Purpose: exact required field length (in utf-8 characters)
Possible values: positive integer
Default: null

min_length
Purpose: mandatory minimum string length
Possible values: positive integer
Default: null

max_length
Purpose: maximum possible string length
Possible values: positive integer
Default: null

min_max_length
Purpose: maximum and minimum string lengths
Possible values: positive integers, separated by commas
Default: null

hidden
Purpose: ability to create hidden fields, used mainly in Creating forms
Possible values: true, false
Default: false

regexp
Purpose: mandatory match with a regular expression. Many data types derived from char have a specified regexp property by default (e.g. email, redirect). More details in the section Form field validation rules.
Possible values: PHP regular expressions in the form '/[a-z]{5}/'
Default: null

captcha
Purpose: the ability to add a verification code to a text field in a form
Possible values: path from the project root to the file that generates the image (without the initial '/')
Default: null

Examples:

['Title', 'char', 'title']

['Name', 'char', 'name', ['required' => true, 'min_length' => 5]]

['Article', 'char', 'articul', ['required' => true, 'unique' => true, 'min_max_length' => '4.8']]

['Security Code', 'char', 'captcha', ['required' => true, 'captcha' => 'extra/captcha-simple/']]

['Skype', 'char', 'skype', ['regexp' => '/^w+$/']]

Previous section

Boolean

Next section

Numeric: int, float, order
MV workshop banner
MV tracker

© 2014-2025, MV framework team

MV tracker project Github