<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>v4.34 Archives - MIDAS - Room Booking System | Blog</title>
	<atom:link href="https://mid.as/blog/tag/v4-34/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>...Making your facilities work for you!</description>
	<lastBuildDate>Tue, 11 Feb 2025 16:53:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Custom Validation For Required Fields</title>
		<link>https://mid.as/blog/custom-validation-for-required-fields/</link>
		
		<dc:creator><![CDATA[midas]]></dc:creator>
		<pubDate>Thu, 20 Jul 2023 12:08:22 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[custom booking fields]]></category>
		<category><![CDATA[custom fields]]></category>
		<category><![CDATA[v4.34]]></category>
		<guid isPermaLink="false">https://mid.as/blog/?p=4578</guid>

					<description><![CDATA[<p>MIDAS ships with a set of standard booking and client input fields. These input fields allow you to capture specific details about a client and their bookings. Now some of these fields will always be required. For bookings, a minimum of a date and a venue (room/bookable space) is required. All other booking fields can [&#8230;]</p>
<p>The post <a href="https://mid.as/blog/custom-validation-for-required-fields/">Custom Validation For Required Fields</a> appeared first on <a href="https://mid.as/blog">MIDAS - Room Booking System | Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>MIDAS ships with a set of standard booking and client input fields. These input fields allow you to capture specific details about a client and their bookings.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img fetchpriority="high" decoding="async" width="1024" height="524" src="https://mid.as/blog/wp-content/uploads/2023/07/input-fields-1024x524.png" alt="Standard Input Fields In MIDAS" class="wp-image-4599" srcset="https://mid.as/blog/wp-content/uploads/2023/07/input-fields-1024x524.png 1024w, https://mid.as/blog/wp-content/uploads/2023/07/input-fields-300x153.png 300w, https://mid.as/blog/wp-content/uploads/2023/07/input-fields-768x393.png 768w, https://mid.as/blog/wp-content/uploads/2023/07/input-fields.png 1095w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Standard Input Fields In MIDAS</figcaption></figure>
</div>


<p>Now some of these fields will always be required. For bookings, a minimum of a date and a venue (room/bookable space) is required. All other booking fields can be set to be optional. Likewise, for clients, a minimum of the client&#8217;s name is required. All other client fields can be set to be optional.</p>



<p>Here&#8217;s a list of the standard fields which are included in MIDAS by default:</p>



<figure class="wp-block-table is-style-stripes has-small-font-size"><table class="has-fixed-layout"><thead><tr><th>Default Booking Fields</th><th>Default Client Fields</th></tr></thead><tbody><tr><td>Date</td><td>Client</td></tr><tr><td>Times (Booking)</td><td>Organization</td></tr><tr><td>Times (Setup / Breakdown)</td><td>E-mail Address</td></tr><tr><td>Venue</td><td>Mailing Address</td></tr><tr><td>Client / Organization</td><td>Telephone Number</td></tr><tr><td>Attendees</td><td>Fax Number <em>(until <a href="https://mid.as/blog/are-fax-numbers-still-relevant/">MIDAS v4.35</a>)</em></td></tr><tr><td>Booking Type</td><td>Cell/Mobile Number</td></tr><tr><td>Booking Notes</td><td>Client Notes</td></tr><tr><td>Resources</td><td></td></tr></tbody></table></figure>



<p>MIDAS also allows you to &#8220;turn off&#8221; fields that you don&#8217;t need. So if you don&#8217;t need to capture a client&#8217;s mailing address, you can disable that field.</p>



<p>But that&#8217;s not all &#8211; in addition to the standard &#8220;default&#8221; fields, you can <a href="https://mid.as/help/manage-fields">create additional custom booking or client fields</a> in MIDAS.</p>



<h2 class="wp-block-heading">Adding Custom Fields</h2>



<p>A range of different types of custom fields can be created, including:</p>



<ul class="wp-block-list">
<li><strong>Checkbox</strong> &#8211; A &#8220;tick box&#8221; field.</li>



<li><strong>File</strong> &#8211; Allows uploading/attaching of files and documents to bookings or client records (self-hosted systems only)</li>



<li><strong>List (Single Select)</strong> &#8211; A drop-down list of pre-defined items from which a single item may be selected.</li>



<li><strong>List (Multi Select)</strong> &#8211; A drop-down list of pre-defined items from which multiple items may be selected.</li>



<li><strong>Number</strong> &#8211; A field that will only accept numerical input.</li>



<li><strong>Range</strong> &#8211; A &#8220;slider&#8221; control allowing selection of a numeric value within a defined range.</li>



<li><strong>Text</strong> &#8211; A single-line text field.</li>



<li><strong>Text Area</strong> &#8211; A multi-line text field.</li>



<li><strong>URL</strong> &#8211; A navigable web link to an external resource.</li>
</ul>



<p>As with standard fields, custom fields can also be set to be &#8220;required&#8221;. This means that an input is required in the custom field each time it&#8217;s shown.</p>



<h2 class="wp-block-heading">New Validation Feature</h2>



<p>For MIDAS v4.34, we&#8217;re extending the capabilities of marking custom number, text, text area, and URL fields &#8220;required&#8221;.</p>



<p>Let&#8217;s take the example of a custom single-line text field. Marking this as a required field would ensure that a user would enter <em>something</em> into the field. However, MIDAS wouldn&#8217;t check what they&#8217;d actually entered. Just entering a single character, or gibberish would be enough to allow you to proceed. </p>



<p>From v4.34 onwards, when setting a custom number, text, text area, and URL field as &#8220;required&#8221;, you can instruct MIDAS what values are considered &#8220;valid&#8221; for the field. A user would then need to enter a &#8220;valid&#8221; value in order to proceed.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" width="990" height="590" src="https://mid.as/blog/wp-content/uploads/2023/07/custom-field-validation.png" alt="Custom Field Validation Using Regular Expressions" class="wp-image-4600" srcset="https://mid.as/blog/wp-content/uploads/2023/07/custom-field-validation.png 990w, https://mid.as/blog/wp-content/uploads/2023/07/custom-field-validation-300x179.png 300w, https://mid.as/blog/wp-content/uploads/2023/07/custom-field-validation-768x458.png 768w" sizes="(max-width: 990px) 100vw, 990px" /><figcaption class="wp-element-caption">Custom Field Validation Using Regular Expressions</figcaption></figure>
</div>


<h2 class="wp-block-heading">A Simple Example</h2>



<p>As an example, you could make it so that a user has to enter the word &#8220;YES&#8221; into a custom text field in order to proceed. If the custom field doesn&#8217;t contain the word &#8220;YES&#8221;, the user will be prompted to correct their entry:</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" width="745" height="440" src="https://mid.as/blog/wp-content/uploads/2023/07/invalid-field-entry.png" alt="Require Valid Entries In Custom Fields" class="wp-image-4602" srcset="https://mid.as/blog/wp-content/uploads/2023/07/invalid-field-entry.png 745w, https://mid.as/blog/wp-content/uploads/2023/07/invalid-field-entry-300x177.png 300w" sizes="(max-width: 745px) 100vw, 745px" /><figcaption class="wp-element-caption">Require Valid Entries In Custom Fields</figcaption></figure>
</div>


<h2 class="wp-block-heading">The Power Of REGEX</h2>



<p><a href="https://mid.as/glossary/regex" class="dfn">Regular Expressions (REGEX)</a> can be used to create more complex validations for your custom fields too. We&#8217;ll cover REGEX in more depth in a future article. In the meantime, as a brief introduction, here are a few simple yet useful REGEX&#8217;s for validating entries into your custom fields:</p>



<figure class="wp-block-table is-style-stripes has-small-font-size"><table class="has-fixed-layout"><thead><tr><th>Description</th><th>REGEX</th></tr></thead><tbody><tr><td>Value must start with the letters &#8220;BOOK&#8221;</td><td><strong>^BOOK</strong></td></tr><tr><td>Value must end with the letters &#8220;ING&#8221;</td><td><strong>ING$</strong></td></tr><tr><td>Value must contain &#8220;BOOKING&#8221;</td><td><strong>BOOKING</strong></td></tr><tr><td>Value must be exactly &#8220;BOOKING&#8221;</td><td><strong>^BOOKING$</strong></td></tr><tr><td>Value must contain a number (digit)</td><td><strong>\d</strong></td></tr><tr><td>Value must not contain a number (digit)</td><td><strong>\D</strong></td></tr><tr><td>Value must be exactly &#8220;BOOK&#8221;, followed by two single digit numbers</td><td><strong>^BOOK\d\d$</strong></td></tr></tbody></table></figure>



<p>You&#8217;ll find further examples together with detailed explanations in our KB article: <a href="https://mid.as/kb/00246/regular-expressions-for-input-validation">How to use Regular Expressions for custom input validation</a>.</p>



<h2 class="wp-block-heading">How To Use</h2>



<p>Custom field validation can be setup via MIDAS Admin Options → Manage MIDAS → Fields.</p>



<p>On any custom number, text, text area, or URL fields, right-click (or long press on touch screens) on the field&#8217;s &#8220;Required&#8221; box.</p>



<p>You&#8217;ll then be able to set or modify the Regular Expression that should be used to validate entries to the field.</p>
<p>The post <a href="https://mid.as/blog/custom-validation-for-required-fields/">Custom Validation For Required Fields</a> appeared first on <a href="https://mid.as/blog">MIDAS - Room Booking System | Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Lazy Loading (feed)
Database Caching 19/33 queries in 0.007 seconds using Disk

Served from: mid.as @ 2026-03-29 20:25:11 by W3 Total Cache
-->