Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8712247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:04:16+00:00 2026-06-13T05:04:16+00:00

Suppose I have a few web forms to implement. The forms contain standard greetings,

  • 0

Suppose I have a few web forms to implement. The forms contain standard greetings, validation messages (e.g. “missing name”, “email address is invalid”), errors (e.g. “temporary processing error”), etc.

Does it make sense to factor out all these text messages from the HTML and store it in an external text file so that non-technical people might edit the text ?

They say it is easier to edit text files instead of HTML. On the other hand I am afraid it would complicate the solution. What are the best practices in that field?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:04:17+00:00Added an answer on June 13, 2026 at 5:04 am

    It depends from case. If texts are often edited by nontechnical people, it may make sense to move text into a separate file with simple structure. Otherwise, it indeed could complicate things.

    Typically, server-side template engine is used to build pages from multiple different resources (such resources are, e.g., HTML-template files, database, configuration files, etc.). What type of resource and format of it to use is up to you and depends on situation. For example, you could store your error texts in JSON-format files like this:

    {
        "name" : {
            "minlength" : {
                "value": 2,
                "error": "Name field must contain at least 2 characters"
            },
            "maxlength" : {
                "value": 255,
                "error": "Name field must contain not more than 255"
            }
        },
        "email" : {
            "pattern" : {
                "value": "some_regexp_for_email_validation",
                "error": "Please input a correct e-mail address"
            }
        }
    }
    

    In PHP in particular, JSON format can be read with json_decode() method.

    An alternative to JSON is XML (though it’s typically harder to use).

    By the way, it may make sense to provide a web interface to edit form error rules and texts for nontechnical people. Then implementation details would be hidden from people who shouldn’t know about them. So you could use whatever you want as for technical part of this while editors would see just a usable GUI with text fields.

    You also may be interested in using ready server-side data-validation solutions like Zend Validator.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have a web project and a bunch of different Web Forms, effectively
Suppose I have a few TextBoxes in a VBA form, called Text1,Text2,Text3. I'm looking
Suppose you have a few, quite large (100k+) objects in available and can provide
Suppose I have a few definitions like so: public interface ICategory { int ID
Hi i am new to hibernate technology and i have few issues. Suppose if
suppose I have a class with many explicit (statically allocated) members and few pointers
OK so I have a few operations for my REST Web Service. There is
I have few buttons in my user control page, Suppose I have btn A,B,C,D,E
I have a few doubts regarding exception handling in iPhone. Here are they: Suppose
I have a screen that is supposed to have a few large sections of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.