본문 바로가기

업무 자동화 · 도구 검증 · 서비스 운영

반복 업무를 줄이는 방법,
직접 시험하고 기록합니다.

예약 명단 정리부터 알림 자동화, 앱 운영까지.
원본 예제와 확인표, 실험 결과를 함께 나눕니다.

첫 번째 실험 · 예약 명단

이름이 같으면
같은 예약일까요?

B102 · 방문자B9월 10일
B103 · 방문자B9월 11일

다른 예약입니다. 둘 다 남겨야 합니다.

가상 명단 12행으로 확인한 결과 →
English Articles

Design a Clear Book-Log Form with AI: Field Rules, Helpful Messages, and Boundary Checks

by 코딩히어로 2026. 9. 25.
300x250
반응형

A book-log app may have only three fields, yet each field asks for a small decision: what value belongs here, when can it be saved, and what guidance appears if it needs attention? Defining those decisions before asking AI to write code gives you a screen you can test with real inputs. This tutorial uses a fictional reading log; every length and date rule below is an example to adapt to your app.

Write the field contract first

Suppose a reader records a book title, the date they finished reading, and an optional note. Decide whether spaces around a title are trimmed, whether future dates make sense, and how long a note may be. A visible label should remain available even after someone starts typing. Placeholder text may offer an example, but it does not replace the field name.

FieldExample ruleVisible guidanceBoundary case
Book titleRequired; trim outer spaces; 1–100 charactersEnter a book title100 and 101 characters
Date readRequired; today or earlierChoose the date you read itToday and tomorrow
Short noteOptional; up to 200 charactersAdd a sentence to rememberEmpty and 200 characters

The date rule fits a completed-reading log. An app that also tracks planned reading would need a separate status or a different date rule. Write this purpose beside the field contract so a future change can be discussed with a concrete example.

Give the browser and the server distinct jobs

HTML form controls can mark fields as required and constrain text length. The browser can show a message near the field while the person still has the rest of the form in view. When an app sends data to a server, the server must also check the received values before saving them. The browser helps someone correct an entry; the server applies the app's storage rules to the received request. See MDN's form-validation guide for the underlying HTML features and the reason to validate on both sides.

For this example, trim the title first and then measure the result. If the input is spaces only, show “Enter a book title” next to the title field. If a note is over the chosen limit, say “Use 200 characters or fewer.” Keep the other entered values on screen so the reader can adjust one field and try again. Pair any color cue with words, since the message carries the next action.

Ask AI for a screen that follows the contract

Build a book-log input screen with three labeled fields: book title, date read, and optional short note. Trim outer title spaces and require 1–100 characters. Require a date no later than today. Allow an empty note or up to 200 characters. Put a specific correction message beside each field that needs attention, retain the values in the other fields, and show a clear save result. If you add server storage, apply the same field rules to the received data before saving. Tell me where the field rules live so I can change the limits later.

Review the result against the table instead of judging it by appearance alone. A field may look complete while its save behavior is still unspecified. If the generated app uses a different limit, update the implementation or the contract deliberately and keep both sides aligned.

Try the boundaries, then inspect the saved record

Run at least six checks: blank title, spaces-only title, exactly 100 title characters, 101 title characters, today's date, and tomorrow's date. Then try an empty note and a 200-character note. Record each input, the expected guidance or save result, and the observed result. When a valid entry is saved, open the list and compare its title, date, and note with what you entered. If a server is involved, confirm the saved record through the app's normal view rather than relying on a button message alone.

This is a design and test exercise, not a report of a deployed app. A useful next step is to change one rule—for example, permit planned reading dates—and update the field contract, messages, browser checks, server checks, and test rows together. The diagram below shows how one field rule stays connected from input to saved record.

Read the Korean edition of this article.

Diagram: one book-title rule stays visible at the input label, browser guidance, server check, and saved record.

300x250
반응형

댓글